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

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

Issue 3010963002: Report internal error when an exported library isn't loaded.
Patch Set: Created 3 years, 3 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/lib/src/fasta/fasta_codes_generated.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/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 4899ca5c9c74250fb1f4811f2960c64fbdd3ddcb..e0e5d8a7ff7f96ea052130caabfed7d9074ee830 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
@@ -18,9 +18,10 @@ import 'package:kernel/ast.dart'
StringLiteral,
Typedef;
-import '../fasta_codes.dart' show templateUnspecified;
+import '../fasta_codes.dart'
+ show templateInternalProblemExportedLibraryNotLoaded, templateUnspecified;
-import '../problems.dart' show unhandled, unimplemented;
+import '../problems.dart' show internalProblem, unhandled, unimplemented;
import '../kernel/kernel_builder.dart'
show
@@ -182,7 +183,14 @@ class DillLibraryBuilder extends LibraryBuilder<KernelTypeBuilder, Library> {
} else {
unhandled("${node.runtimeType}", "finalizeExports", -1, fileUri);
}
- var library = loader.read(libraryUri, -1);
+ DillLibraryBuilder library = loader.builders[libraryUri];
scheglov 2017/09/04 18:31:14 What if we have mutually exporting libraries?
ahe 2017/09/06 07:55:50 If they're in the same dill file, it shouldn't be
+ if (library == null) {
+ internalProblem(
+ templateInternalProblemExportedLibraryNotLoaded.withArguments(
+ libraryUri, uri),
+ -1,
+ fileUri);
+ }
Builder builder;
if (isSetter) {
builder = library.exportScope.setters[name];
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/fasta_codes_generated.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698