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

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

Issue 11569014: Issue 6974. Report warning when arguments are given for 'dynamic' or type variable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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
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 bcad2fa2c0f6a4c059c57347dce22fd7408e68a2..29826f4e7f2ad775b119272abf44655cddd7d1eb 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
@@ -463,6 +463,18 @@ public class ResolverTest extends ResolverTestCase {
TypeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS);
}
+ public void test_variableStatement_typeArgumentsForDynamic() throws Exception {
+ resolveAndTest(
+ Joiner.on("\n").join(
+ "class Object {}",
+ "class MyClass {",
+ " bar() {",
+ " dynamic<Object> v1;",
+ " }",
+ "}"),
+ TypeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS);
+ }
+
public void test_noSuchType_classExtends() throws Exception {
resolveAndTest(Joiner.on("\n").join(
"class Object {}",
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698