| 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 ee5860a488e46a358165c26c1279417fb4f30f4e..c08537efd47942c06dc294dcf81db3dbd7ca6121 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -4920,7 +4920,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| result.getErrors(),
|
| errEx(ResolverErrorCode.FORMAL_PARAMETER_NAME_EXPECTED, 5, 4, 1));
|
| }
|
| -
|
| +
|
| /**
|
| * <p>
|
| * http://code.google.com/p/dart/issues/detail?id=5148
|
| @@ -4937,6 +4937,23 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| errEx(ResolverErrorCode.STATIC_METHOD_MUST_HAVE_BODY, 3, 3, 13));
|
| }
|
|
|
| + /**
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=5162
|
| + */
|
| + public void test_initializeFinalInstanceVariable_atDeclaration_inInitializer() throws Exception {
|
| + AnalyzeLibraryResult result = analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "class A {",
|
| + " final f = 0;",
|
| + " A() : f = 1 {}",
|
| + "}",
|
| + "");
|
| + assertErrors(
|
| + result.getErrors(),
|
| + errEx(ResolverErrorCode.DUPLICATE_INITIALIZATION, 4, 9, 5));
|
| + }
|
| +
|
| private <T extends DartNode> T findNode(final Class<T> clazz, String pattern) {
|
| final int index = testSource.indexOf(pattern);
|
| assertTrue(index != -1);
|
|
|