Chromium Code Reviews| 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 79c1276028125ef19c6ccdd8ca701fe82b873aa8..f49f911d49b4be5c7b69e54a12601048c46fe305 100644 |
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java |
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java |
| @@ -1726,6 +1726,9 @@ public class TypeAnalyzer implements DartCompilationPhase { |
| DartMethodDefinition accessor = node.getAccessor(); |
| if (accessor != null) { |
| return typeOf(accessor); |
| + } else if (node.getElement().getConstantType() != null) { |
| + checkAssignable(node, node.getElement().getType(), node.getElement().getConstantType()); |
|
scheglov
2012/03/19 19:17:48
indentation
|
| + return node.getElement().getType(); |
| } else { |
| return checkInitializedDeclaration(node, node.getValue()); |
| } |