| 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 4e70c706fe1947f208fa3a63009ee7818c165e0b..a2476d1435624320a246a5a6bcc7a6f61c6423a0 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -374,6 +374,19 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| libraryResult.getErrors(),
|
| errEx(TypeErrorCode.CASE_EXPRESSIONS_SHOULD_BE_SAME_TYPE, 5, 10, 3));
|
| }
|
| +
|
| + public void test_switchExpression_case_finalLocalVariable() throws Exception {
|
| + AnalyzeLibraryResult libraryResult = analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "foo(var v) {",
|
| + " final int VALUE = 0;",
|
| + " switch (v) {",
|
| + " case VALUE: break;",
|
| + " }",
|
| + "}",
|
| + "");
|
| + assertErrors(libraryResult.getErrors());
|
| + }
|
|
|
| /**
|
| * Language specification requires that factory should be declared in class. However declaring
|
|
|