Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java

Issue 9190044: Issue 1140: Tweak relative path for shadowing problems. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/Elements.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+ }
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/Elements.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698