Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
index 8689b3399b64f71310c7807aea17e2cae3e22195..a16e2de184d0d2c949ba6e91050980f987a28bc7 100644 |
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
@@ -813,7 +813,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase { |
errEx(TypeErrorCode.FIELD_IS_FINAL, 7, 5, 1), |
errEx(TypeErrorCode.FIELD_IS_FINAL, 8, 5, 1)); |
} |
- |
+ |
public void test_finalField_inInterface() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
getName(), |
@@ -1460,6 +1460,19 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase { |
assertVariableTypeString(libraryResult, "v2", "bool"); |
} |
+ public void test_getType_getterInSwitch() throws Exception { |
+ AnalyzeLibraryResult libraryResult = analyzeLibrary( |
+ "int get foo() {}", |
+ "f() {", |
+ " switch (true) {", |
+ " default:", |
+ " int v = foo;", |
+ " }", |
+ "}", |
+ ""); |
+ assertErrors(libraryResult.getErrors()); |
+ } |
+ |
/** |
* Asserts that {@link VariableElement} with given name has expected type. |
*/ |