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

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

Issue 9963082: Dartc's 'can't use a type variable in static context' message now works the same way as 'NO_SUCH_TY… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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/TypeErrorCode.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
index 263a8471349e544438ec692698ddf41efd688e2a..cb4fc4e1f8b00f585f78c9a8e83ef48a09d3ab54 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
@@ -1058,9 +1058,11 @@ public class ResolverTest extends ResolverTestCase {
"class Object {}",
"class A<T> {",
" static foo() { new T(); }", // can't ref type variable in method
+ " static bar() { T variable = 1; }",
"}"),
ResolverErrorCode.TYPE_VARIABLE_IN_STATIC_CONTEXT,
- ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR);
+ ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR,
+ TypeErrorCode.TYPE_VARIABLE_IN_STATIC_CONTEXT);
}
public void testTypeVariableShadowsClass() {
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698