| Index: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| index 59acbc7b0f5877e1bca03e831b0f75bc0754d178..db527b7ecc8fdd239a0996be1a8c014747bcb723 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| @@ -644,6 +644,10 @@ public class NegativeResolverTest extends CompilerTestCase {
|
| " }",
|
| "}"),
|
| errEx(ResolverErrorCode.DUPLICATE_PARAMETER_WARNING, 4, 14, 1));
|
| + {
|
| + String message = errors.get(0).getMessage();
|
| + assertEquals("Parameter 'a' is hiding 'FIELD a' at Test.dart::2:5", message);
|
| + }
|
| }
|
|
|
| public void test_nameShadow_staticField_instanceMethodParameter() {
|
| @@ -724,7 +728,7 @@ public class NegativeResolverTest extends CompilerTestCase {
|
| errEx(ResolverErrorCode.DUPLICATE_TYPE_VARIABLE_WARNING, 4, 12, 2));
|
| {
|
| String message = errors.get(0).getMessage();
|
| - assertEquals("Type variable 'BB' is hiding 'CLASS BB' at Test.dart:BB:2:7", message);
|
| + assertEquals("Type variable 'BB' is hiding 'CLASS BB' at Test.dart::2:7", message);
|
| }
|
| }
|
|
|
| @@ -1083,9 +1087,9 @@ public class NegativeResolverTest extends CompilerTestCase {
|
| "main() {",
|
| " func = null;",
|
| "}"),
|
| - errEx(ResolverErrorCode.CANNOT_ASSIGN_TO_METHOD, 4, 3, 4));
|
| + errEx(ResolverErrorCode.CANNOT_ASSIGN_TO_METHOD, 4, 3, 4));
|
| }
|
| -
|
| +
|
| public void testConstructorDuplicateInitializationTest() {
|
| checkSourceErrors(
|
| makeCode(
|
| @@ -1099,16 +1103,16 @@ public class NegativeResolverTest extends CompilerTestCase {
|
| }
|
|
|
| public void testInitializerReferenceToThis() throws Exception {
|
| - checkSourceErrors(
|
| - makeCode(
|
| - "class A {",
|
| - " var x, y;",
|
| - " A.one(z) : x = z, y = this.x;",
|
| - " A.two(this.x) : y = (() { return this; });",
|
| - " A.three(this.x) : y = this.x;",
|
| - "}"),
|
| - errEx(ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION, 3, 25, 4),
|
| - errEx(ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION, 4, 36, 4),
|
| - errEx(ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION, 5, 25, 4));
|
| - }
|
| + checkSourceErrors(
|
| + makeCode(
|
| + "class A {",
|
| + " var x, y;",
|
| + " A.one(z) : x = z, y = this.x;",
|
| + " A.two(this.x) : y = (() { return this; });",
|
| + " A.three(this.x) : y = this.x;",
|
| + "}"),
|
| + errEx(ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION, 3, 25, 4),
|
| + errEx(ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION, 4, 36, 4),
|
| + errEx(ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION, 5, 25, 4));
|
| + }
|
| }
|
|
|