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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 2909043002: Make dart2js understand relative part-of in platform libraries. (Closed)
Patch Set: git cl land 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 2f40c9213783d019ba5029419a4cf0b194f33eae..5a241c6a2deff65b8ad2772e3905b970cf796fae 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -782,6 +782,10 @@ class CompilationUnitElementX extends ElementX
String content = libraryReference.dartString.slowToString();
Uri uri = this.script.readableUri.resolve(content);
Uri expectedUri = library.canonicalUri;
+ // Also allow `string.dart` to refer to `dart:core` as `core.dart`.
+ if (library.isPlatformLibrary && !uri.isScheme("dart")) {
+ expectedUri = library.entryCompilationUnit.script.readableUri;
+ }
if (uri != expectedUri) {
// Consider finding a relative URI reference for the error message.
reporter.reportWarningMessage(tag.name,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698