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

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

Issue 11418233: Triage some co19 tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 e27f146fcbddbc3aa135fc3f87938394275f8568..fa7c79507ad735d6cc91024d1e91cff5723b0953 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
@@ -393,6 +393,18 @@ public class ResolverTest extends ResolverTestCase {
"}"),
ResolverErrorCode.NEW_EXPRESSION_CANT_USE_TYPE_VAR);
}
+
+ public void testConstExpression4() {
+ // New expression tied to an unbound type variable is not allowed.
+ resolveAndTest(Joiner.on("\n").join(
+ "class Object {}",
+ "class Foo<T> {",
+ " T create() {",
+ " return const T();",
+ " }",
+ "}"),
+ ResolverErrorCode.CONST_EXPRESSION_CANT_USE_TYPE_VAR);
+ }
public void testNewExpression5() {
// More cowbell. (Foo<T> isn't a type yet)
« 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