Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Elements.java

Issue 8382003: Can not find Element in Dynamic element. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698