Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2188)

Unified Diff: pkg/analyzer/test/dart/ast/ast_test.dart

Issue 2029193003: Report HintCode.UNUSED_FIELD for fields which are referenced in constructor field initializers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/dart/ast/ast_test.dart
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index 35ff9a9029630b4976faca25eb4115b5f920c90e..122a93e014a19682e7df00e9835791785a2825c4 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -592,6 +592,13 @@ class SimpleIdentifierTest extends ParserTestCase {
}
}
+ void test_inGetterContext_constructorFieldInitializer() {
+ ConstructorFieldInitializer initializer = AstFactory
+ .constructorFieldInitializer(false, 'f', AstFactory.integer(0));
+ SimpleIdentifier identifier = initializer.fieldName;
+ expect(identifier.inGetterContext(), isFalse);
+ }
+
void test_inGetterContext_forEachLoop() {
SimpleIdentifier identifier = AstFactory.identifier3("a");
Expression iterator = AstFactory.listLiteral();
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698