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 08d2f3397e78df5fcee2606efdfcbfd5cdcf9bb8..f2fe6634f0150a3fc511bd22024f201f4daa23fb 100644 |
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java |
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java |
@@ -111,7 +111,10 @@ public class Elements { |
} |
static Element findElement(ClassElement cls, String name) { |
- return ((ClassElementImplementation) cls).findElement(name); |
+ if (cls instanceof ClassElementImplementation) { |
zundel
2011/10/24 15:07:44
I think rather than an instanceof test, the prefer
scheglov
2011/10/24 19:57:55
I'm not sure.
At first, we cast to this type, so i
|
+ return ((ClassElementImplementation) cls).findElement(name); |
+ } |
+ return null; |
} |
public static MethodElement methodFromFunctionExpression(DartFunctionExpression node, |