Index: compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantResolver.java |
diff --git a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantResolver.java b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantResolver.java |
index 3d4d167dbf2fa25a988a76ae31b79e1801d170d0..564a494059d37f0e32561e1b6c49e0aeb4866b2c 100644 |
--- a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantResolver.java |
+++ b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantResolver.java |
@@ -6,6 +6,7 @@ package com.google.dart.compiler.resolver; |
import com.google.common.annotations.VisibleForTesting; |
import com.google.dart.compiler.DartCompilerContext; |
+import com.google.dart.compiler.ast.DartBlock; |
import com.google.dart.compiler.ast.DartClass; |
import com.google.dart.compiler.ast.DartExpression; |
import com.google.dart.compiler.ast.DartField; |
@@ -202,6 +203,11 @@ public class CompileTimeConstantResolver { |
} |
} |
context = previousContext; |
+ // resolve reference in body |
+ DartBlock body = node.getFunction().getBody(); |
+ if (body != null) { |
+ super.visitBlock(body); |
+ } |
return null; |
} |