Chromium Code Reviews| 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 " |