Chromium Code Reviews| 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 5b80da634868dc808171ade6d20f64ef0af18501..cae6a3e76fcdf787b3221f7d9366ddaaef981a00 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart |
| @@ -566,12 +566,17 @@ class Elements { |
| static bool isConstructorOfTypedArraySubclass(Element element, |
| Compiler compiler) { |
| - 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 == ''; |
| + if (compiler.typedDataLibrary == null) return false; |
| + if (!element.isConstructor()) return false; |
| + FunctionElement constructor = element; |
| + constructor = constructor.redirectionTarget; |
| + ClassElement cls = constructor.getEnclosingClass(); |
| + //if (cls == null) return false; |
|
floitsch
2014/01/15 09:33:30
Remove?
sra1
2014/01/15 20:13:41
Done.
|
| + return cls.getLibrary() == compiler.typedDataLibrary |
| + && cls.isNative() |
| + && compiler.world.isSubtype(compiler.typedDataClass, cls) |
| + && compiler.world.isSubtype(compiler.listClass, cls) |
| + && constructor.name == ''; |
| } |
| static bool switchStatementHasContinue(SwitchStatement node, |