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

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: Tweak for test. 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
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d3e06081e34080644a06620f5b560e7c28e954f5 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) {
+ return ((ClassElementImplementation) cls).findElement(name);
+ }
+ return null;
}
public static MethodElement methodFromFunctionExpression(DartFunctionExpression node,
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698