| Index: sdk/lib/_internal/compiler/implementation/elements/elements.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
|
| index b714528f03ab4c9e50a62be750935f0634a2cac9..5b80da634868dc808171ade6d20f64ef0af18501 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
|
| @@ -566,16 +566,12 @@ class Elements {
|
|
|
| static bool isConstructorOfTypedArraySubclass(Element element,
|
| Compiler compiler) {
|
| - if (compiler.typedDataLibrary == null) return false;
|
| - if (!element.isConstructor()) return false;
|
| - FunctionElement constructor = element;
|
| - constructor = constructor.redirectionTarget;
|
| - ClassElement cls = constructor.getEnclosingClass();
|
| - return cls.getLibrary() == compiler.typedDataLibrary
|
| - && cls.isNative()
|
| - && compiler.world.isSubtype(compiler.typedDataClass, cls)
|
| - && compiler.world.isSubtype(compiler.listClass, cls)
|
| - && constructor.name == '';
|
| + if (compiler.typedDataClass == null) return false;
|
| + ClassElement cls = element.getEnclosingClass();
|
| + if (cls == null || !element.isConstructor()) return false;
|
| + return compiler.world.isSubclass(compiler.typedDataClass, cls)
|
| + && cls.getLibrary() == compiler.typedDataLibrary
|
| + && element.name == '';
|
| }
|
|
|
| static bool switchStatementHasContinue(SwitchStatement node,
|
|
|