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

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

Issue 2909043002: Make dart2js understand relative part-of in platform libraries. (Closed)
Patch Set: Allow both 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..608e4eca72bd5120a788248d0e201d931a99ad52 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -782,6 +782,9 @@ class CompilationUnitElementX extends ElementX
String content = libraryReference.dartString.slowToString();
Uri uri = this.script.readableUri.resolve(content);
Lasse Reichstein Nielsen 2017/05/29 12:46:28 This "readableUri", is that the package URI for a
Johnni Winther 2017/05/29 12:52:31 Yes.
Uri expectedUri = library.canonicalUri;
+ if (library.isPlatformLibrary && !uri.isScheme("dart")) {
+ expectedUri = library.entryCompilationUnit.script.readableUri;
Johnni Winther 2017/05/29 12:52:31 Add a comment like: // Allow 'string.dart' to ref
Lasse Reichstein Nielsen 2017/05/29 13:12:03 Done.
+ }
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