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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java

Issue 9016053: Violating type bounds on a new invocation is a static type error, not a compile error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added junit test' Created 8 years, 12 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
Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
index 4986f8660dda6732a01272a9464776a4368a4ff1..576dee55cee8b4252feb732db0dd85d7778ec3d4 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
@@ -819,6 +819,8 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
"}",
"class Baz<T> {",
" factory Bar.make(T x) { return null; }",
+ "}",
+ "class Foobar<T extends String> {",
"}"));
analyze("Foo x = new Foo(0);");
@@ -833,7 +835,7 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
analyze("Foo x = new Foo.bar(0);");
analyzeFail("Foo x = new Foo.bar('');", TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
analyzeFail("Foo x = new Foo.bar(0, null);", TypeErrorCode.EXTRA_ARGUMENT);
-
+ analyzeFail("var x = new Foobar<num>();", TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
analyze("Bar<String> x = new Bar.make('');");
}

Powered by Google App Engine
This is Rietveld 408576698