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..84106bf90d73914808926fe0836c653bbd131b6a 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') && |
| blackListedClasses.contains(supertype)) { |
| + // TODO(sigmund): we may want to use a stricter check here. Today |
| + // these classes are extended in dart:core (for VM) and |
| + // dart:_interceptors (for dart2js). |
|
Siggi Cherem (dart-lang)
2017/05/10 18:14:22
not sure that it is worth saying in the TODO: I do
scheglov
2017/05/10 18:27:47
FWIW, in analyzer we use similar check - we allow
|
| cls.addCompileTimeError( |
| cls.charOffset, |
| "'${supertype.name}' is restricted and can't be extended or " |