Index: pkg/front_end/lib/src/fasta/loader.dart |
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart |
index 743dcf6eaf3e20bf9026f5a580d4ddb88275eebc..5a1953bcf67becb0e7f69772f455d1b2f958b8f1 100644 |
--- a/pkg/front_end/lib/src/fasta/loader.dart |
+++ b/pkg/front_end/lib/src/fasta/loader.dart |
@@ -102,9 +102,8 @@ abstract class Loader<L> { |
return library; |
}); |
if (accessor != null && |
- uri.scheme == "dart" && |
- uri.path.startsWith("_") && |
- accessor.uri.scheme != "dart") { |
+ !target.backendTarget |
+ .allowPlatformPrivateLibraryAccess(accessor.uri, uri)) { |
accessor.addCompileTimeError( |
messagePlatformPrivateLibraryAccess, charOffset, accessor.fileUri); |
} |