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

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

Issue 1062723002: Implement the new '?.' operator in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Bump analyzer version. Created 5 years, 8 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
Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index a78311fcd86a8d81b2602191ac34b6c0ddfc877d..b85362645428d3a95d5bf914ef02b153d3a95f29 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -1626,8 +1626,12 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
return parent is TypeName ||
(parent is PrefixedIdentifier &&
(parent.parent is TypeName || identical(parent.prefix, node))) ||
- (parent is PropertyAccess && identical(parent.target, node)) ||
- (parent is MethodInvocation && identical(node, parent.target));
+ (parent is PropertyAccess &&
+ identical(parent.target, node) &&
+ parent.operator.type == TokenType.PERIOD) ||
+ (parent is MethodInvocation &&
+ identical(node, parent.target) &&
+ parent.operator.type == TokenType.PERIOD);
}
/**

Powered by Google App Engine
This is Rietveld 408576698