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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_loader.dart

Issue 2869393003: Allow overriding core types in dart:_interceptors. (Closed)
Patch Set: remove todo, just document 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/front_end/lib/src/fasta/source/source_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 47a43b20de120c2f89392d5ff086435ef173d914..3c6e5be11638b49de4a4172db1efbe29b584add9 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -391,8 +391,11 @@ class SourceLoader<L> extends Loader<L> {
cls.charOffset,
"'${supertype.name}' is an enum and can't be extended or "
"implemented.");
- } else if (cls.library != coreLibrary &&
+ } else if (!cls.library.uri.isScheme('dart') &&
ahe 2017/05/29 15:49:55 I'm concerned about performance of this change. Th
Siggi Cherem (dart-lang) 2017/05/30 19:22:01 Good point - I'll take a stab at making this overr
Siggi Cherem (dart-lang) 2017/05/30 21:16:58 Sent you https://codereview.chromium.org/290733300
blackListedClasses.contains(supertype)) {
+ // These types are rarely extended in more than one platform library
+ // but it can be on different libraries depending on the target
+ // platform (e.g. dart:core for VM, dart:_interceptors for dart2js).
cls.addCompileTimeError(
cls.charOffset,
"'${supertype.name}' is restricted and can't be extended or "
« 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