Index: pkg/analyzer/lib/src/generated/resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart |
index 4f73b723309f18f0dd7f4f49a4d0d2bfc4f4f0d3..84f0f6b2bccd175b8f2f3cef08dd0f8da37aa873 100644 |
--- a/pkg/analyzer/lib/src/generated/resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/resolver.dart |
@@ -15722,13 +15722,26 @@ class VariableResolverVisitor extends ScopedVisitor { |
} |
@override |
+ Object visitTypeName(TypeName node) { |
+ return null; |
+ } |
+ |
+ @override |
Object visitSimpleIdentifier(SimpleIdentifier node) { |
// Ignore if already resolved - declaration or type. |
- if (node.staticElement != null) { |
+ if (node.inDeclarationContext()) { |
return null; |
} |
- // Ignore if qualified. |
+ // Ignore if it cannot be a reference to a local variable. |
AstNode parent = node.parent; |
+ if (parent is FieldFormalParameter) { |
+ return null; |
+ } else if (parent is ConstructorDeclaration && parent.returnType == node) { |
+ return null; |
+ } else if (parent is ConstructorFieldInitializer && parent.fieldName == node) { |
+ return null; |
+ } |
+ // Ignore if qualified. |
if (parent is PrefixedIdentifier && identical(parent.identifier, node)) { |
return null; |
} |