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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2776153002: Handle complicated exports. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | tests/language/language_kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/source/source_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 7b8293d0325bea62392edc89ad08d7de32e084b4..b5e57e00918de3baecb3d76ee501fc3d9ca1945c 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -411,13 +411,14 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
}
}
+ /// Returns true if the export scope was modified.
bool addToExportScope(String name, Builder member) {
if (name.startsWith("_")) return false;
if (member is PrefixBuilder) return false;
Builder existing = exports[name];
+ if (existing == member) return false;
if (existing != null) {
- // TODO(ahe): handle duplicated names.
- return false;
+ exports[name] = buildAmbiguousBuilder(name, existing, member, -1);
} else {
exports[name] = member;
}
« no previous file with comments | « no previous file | tests/language/language_kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698