| 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..9f5a8e2c46bf2012ac82b23b7d380505a94cfb10 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -837,6 +837,26 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| errEx(TypeErrorCode.FIELD_IS_FINAL, 11, 5, 1));
|
| }
|
|
|
| + public void test_notFinalField() throws Exception {
|
| + AnalyzeLibraryResult libraryResult = analyzeLibrary(
|
| + getName(),
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "interface I default A {",
|
| + " var f;",
|
| + "}",
|
| + "class A implements I {",
|
| + " var f;",
|
| + "}",
|
| + "main() {",
|
| + " I a = new I();",
|
| + " a.f = 0;", // 6: OK, field "f" is not final
|
| + " a.f += 1;", // 7: OK, field "f" is not final
|
| + " print(a.f);", // 8: OK, can read
|
| + "}"));
|
| + assertErrors(libraryResult.getTypeErrors());
|
| + }
|
| +
|
| /**
|
| * Test for variants of {@link DartMethodDefinition} return types.
|
| */
|
|
|