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

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

Issue 1178203002: Don't visit named argument labels when computing constant dependencies. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/constant.dart
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 6e157fccf8bde622fe464829ccaaa0b492e1ca0f..15491e37d63bfdbb7b9ba61377aa7fcb30b203de 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -5006,6 +5006,16 @@ class ReferenceFinder extends RecursiveAstVisitor<Object> {
}
@override
+ Object visitLabel(Label node) {
+ // We are visiting the "label" part of a named expression in a function
+ // call (presumably a constructor call), e.g. "const C(label: ...)". We
+ // don't want to visit the SimpleIdentifier for the label because that's a
+ // reference to a function parameter that needs to be filled in; it's not a
+ // constant whose value we depend on.
+ return null;
+ }
+
+ @override
Object visitRedirectingConstructorInvocation(
RedirectingConstructorInvocation node) {
super.visitRedirectingConstructorInvocation(node);
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698