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

Unified Diff: sdk/lib/_internal/compiler/implementation/library_loader.dart

Issue 25006003: Revert "Allow import/export of libraries with no name." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/library_loader.dart
diff --git a/sdk/lib/_internal/compiler/implementation/library_loader.dart b/sdk/lib/_internal/compiler/implementation/library_loader.dart
index 1342ce8cbe080f457dcb87324ba557ead384517b..be9e3b76a8ca713d9de25f05feb19ecfb5fba9c1 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -421,6 +421,15 @@ class LibraryLoaderTask extends LibraryLoader {
if (loadedLibrary == null) return;
compiler.withCurrentElement(library, () {
handler.registerDependency(library, tag, loadedLibrary);
+
+ if (!loadedLibrary.hasLibraryName()) {
+ compiler.reportFatalError(
+ tag == null ? null : tag.uri,
+ MessageKind.GENERIC,
+ {'text':
+ 'Error: No library name found in '
+ '${loadedLibrary.canonicalUri}.'});
+ }
});
});
}
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698