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

Unified Diff: pkg/front_end/lib/src/fasta/scope.dart

Issue 3010763002: Fix for ScopeBuilder[] - look into setters too. (Closed)
Patch Set: Created 3 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/scope.dart
diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart
index dec63216a427478f30dc12e9ea83b2b5bfd1a504..54356f0ccb9e558536daf7c91d642671a8c8d38a 100644
--- a/pkg/front_end/lib/src/fasta/scope.dart
+++ b/pkg/front_end/lib/src/fasta/scope.dart
@@ -280,7 +280,9 @@ class ScopeBuilder {
scope.setters[name] = builder;
}
- Builder operator [](String name) => scope.local[name];
+ Builder operator [](String name) {
+ return scope.local[name] ?? scope.setters[name];
+ }
}
abstract class ProblemBuilder extends Builder {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698