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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1403003002: Partial fix for task model issue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698