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

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

Issue 2780543002: Handle complicated imports. (Closed)
Patch Set: Fix infinite loop. Created 3 years, 9 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/front_end/lib/src/fasta/import.dart
diff --git a/pkg/front_end/lib/src/fasta/import.dart b/pkg/front_end/lib/src/fasta/import.dart
index 6ad4f06157229ff4f4f8f5917a504986fad5405c..c8a943bb50649b67303b880743f648d95ff095f9 100644
--- a/pkg/front_end/lib/src/fasta/import.dart
+++ b/pkg/front_end/lib/src/fasta/import.dart
@@ -34,7 +34,9 @@ class Import {
AddToScope add;
PrefixBuilder prefix;
if (this.prefix == null) {
- add = importer.addToScope;
+ add = (String name, Builder member) {
+ importer.addToScope(name, member, charOffset, true);
+ };
} else {
prefix = new PrefixBuilder(
this.prefix, <String, Builder>{}, importer, prefixCharOffset);
@@ -54,7 +56,7 @@ class Import {
if (prefix != null) {
Builder existing = importer.addBuilder(prefix.name, prefix, charOffset);
if (existing == prefix) {
- importer.addToScope(prefix.name, prefix);
+ importer.addToScope(prefix.name, prefix, prefixCharOffset, true);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698