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

Unified Diff: pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart

Issue 2893383002: Move the check for 'locals hides exports' to DillLibraryBuilder.buildAmbiguousBuilder(). (Closed)
Patch Set: Created 3 years, 7 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 | « pkg/front_end/lib/src/fasta/builder/library_builder.dart ('k') | 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/dill/dill_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
index 0e6f177afa941bcbb235d9907b4e9a1071e25018..3ca8680629f91007f66fa28bc665525ce94fc0ce 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
@@ -24,6 +24,7 @@ import '../errors.dart' show internalError;
import '../kernel/kernel_builder.dart'
show
Builder,
+ InvalidTypeBuilder,
KernelInvalidTypeBuilder,
KernelTypeBuilder,
LibraryBuilder,
@@ -120,6 +121,13 @@ class DillLibraryBuilder extends LibraryBuilder<KernelTypeBuilder, Library> {
Builder buildAmbiguousBuilder(
String name, Builder builder, Builder other, int charOffset,
{bool isExport: false, bool isImport: false}) {
+ if (builder == other) return builder;
+ if (builder is InvalidTypeBuilder) return builder;
+ if (other is InvalidTypeBuilder) return other;
+ // For each entry mapping key `k` to declaration `d` in `NS` an entry
+ // mapping `k` to `d` is added to the exported namespace of `L` unless a
+ // top-level declaration with the name `k` exists in `L`.
+ if (builder.parent == this) return builder;
return new KernelInvalidTypeBuilder(name, charOffset, fileUri);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/library_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698