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

Unified Diff: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java

Issue 11412040: Issue 6718. Resolve initializers in wrong methods, but report error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/type/TypeAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index 1ca3593b0e7cf4e0710d47a3d511ee05466988a6..e6a64192bc157bc25fe7e5e5c2f6f79d60d4c825 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -1860,7 +1860,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
@Override
public Type visitFunctionExpression(DartFunctionExpression node) {
node.visitChildren(this);
- Type result = ((Element) node.getElement()).getType();
+ Type result = node.getElement().getType();
result.getClass(); // quick null check
return result;
}

Powered by Google App Engine
This is Rietveld 408576698