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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java

Issue 18110007: Report CTEC.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS for 'const' instance creation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index e8e820c0480c7873ba0b8ec6045286252223c4cd..6f47f6f883958f02e056033bf7a111326e8f28e5 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -3087,6 +3087,20 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
+ // TODO(scheglov)
+ public void test_typeArgumentNotMatchingBounds_const() throws Exception {
+ Source source = addSource(createSource(//
+ "class A {}",
+ "class B {}",
+ "class G<E extends A> {",
+ " const G();",
+ "}",
+ "f() { return const G<B>(); }"));
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS);
+ verify(source);
+ }
+
public void test_undefinedClass_const() throws Exception {
Source source = addSource(createSource(//
"f() {",

Powered by Google App Engine
This is Rietveld 408576698