Index: compiler/java/com/google/dart/compiler/resolver/Elements.java |
diff --git a/compiler/java/com/google/dart/compiler/resolver/Elements.java b/compiler/java/com/google/dart/compiler/resolver/Elements.java |
index 41ac3cdfb077cd07cb7b4d497257b69bc24a0f74..846b420a6a3c3e337c7849102b05c43e535aa70d 100644 |
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java |
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java |
@@ -169,7 +169,10 @@ public class Elements { |
} |
static ConstructorElement lookupConstructor(ClassElement cls, String name) { |
- return ((ClassElementImplementation) cls).lookupConstructor(name); |
+ if (cls instanceof ClassElementImplementation) { |
+ return ((ClassElementImplementation) cls).lookupConstructor(name); |
+ } |
+ return null; |
} |
public static MethodElement lookupLocalMethod(ClassElement cls, String name) { |