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

Unified Diff: pkg/front_end/lib/src/fasta/builder/library_builder.dart

Issue 2894183002: Local declarations take precedence over exports. (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 | « no previous file | pkg/front_end/test/incremental_kernel_generator_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/builder/library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
index e3067aa8ccbf980457e61dbfc39343eb82734d3b..ec866a9ee1e4a64e0076b2ba39ffea07ffb29729 100644
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
@@ -98,6 +98,11 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
Builder existing = map[name];
if (existing == member) return false;
if (existing != null) {
+ // 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 (existing.parent == this) return false;
ahe 2017/05/22 11:39:45 buildAmbiguousBuilder should take care of this.
scheglov 2017/05/22 18:35:24 Ah, I see now. https://codereview.chromium.org/289
+
Builder result =
buildAmbiguousBuilder(name, existing, member, -1, isExport: true);
map[name] = result;
« no previous file with comments | « no previous file | pkg/front_end/test/incremental_kernel_generator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698