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

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

Issue 8384012: Make some ErrorCode-s compile-time errors and some just type warnings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes for comments 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 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) {

Powered by Google App Engine
This is Rietveld 408576698