Index: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
index e4dc1c7c5e4c23cc495cadd4b86d4e18622d11e7..5f9ef6bc0b7d43312d91918d4eaea26311079ea0 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
@@ -5,6 +5,7 @@ |
library fasta.kernel_library_builder; |
import 'package:front_end/src/fasta/dill/dill_library_builder.dart'; |
+import 'package:front_end/src/fasta/export.dart'; |
import 'package:front_end/src/fasta/import.dart'; |
import 'package:kernel/ast.dart'; |
@@ -731,6 +732,18 @@ class KernelLibraryBuilder |
new LibraryDependency.import(importedLibrary, name: import.prefix)); |
} |
} |
+ for (Export import in exports) { |
+ var exportedBuilder = import.exported; |
+ Library exportedLibrary; |
+ if (exportedBuilder is DillLibraryBuilder) { |
+ exportedLibrary = exportedBuilder.library; |
+ } else if (exportedBuilder is KernelLibraryBuilder) { |
+ exportedLibrary = exportedBuilder.library; |
+ } |
ahe
2017/08/08 09:47:58
I think it's possible to replace lines 735-742 wit
scheglov
2017/08/08 16:18:46
OK, understood.
See https://codereview.chromium.or
|
+ if (exportedLibrary != null) { |
+ library.addDependency(new LibraryDependency.export(exportedLibrary)); |
+ } |
+ } |
library.name = name; |
library.procedures.sort(compareProcedures); |
return library; |
@@ -794,7 +807,7 @@ class KernelLibraryBuilder |
// Handles the case where the same prefix is used for different |
// imports. |
return builder |
- ..exports.merge(other.exports, |
+ ..exportScope.merge(other.exportScope, |
(String name, Builder existing, Builder member) { |
return buildAmbiguousBuilder(name, existing, member, charOffset, |
isExport: isExport, isImport: isImport); |