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

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

Issue 26745004: Implement type variable 'more specific than' and 'subtype'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/StaticWarningCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
index e15858a597f3e64126a145dcd7f46dffcc4b1471..69ef4da07bbe3b3a7f2d44b22f2a8bb2ac7e0a03 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
@@ -19,20 +19,6 @@ import com.google.dart.engine.error.StaticWarningCode;
import com.google.dart.engine.source.Source;
public class StaticWarningCodeTest extends ResolverTestCase {
- public void fail_argumentTypeNotAssignable_invocation_functionParameter_generic()
- throws Exception {
- // TODO(scheglov) requires fix for TypeParameterTypeImpl.isSubtypeOf()
- Source source = addSource(createSource(//
- "class A<K, V> {",
- " m(f(K k), V v) {",
- " f(v);",
- " }",
- "}"));
- resolve(source);
- assertErrors(source, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
- verify(source);
- }
-
public void fail_commentReferenceConstructorNotVisible() throws Exception {
Source source = addSource(createSource(//
// TODO
@@ -484,6 +470,19 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_argumentTypeNotAssignable_invocation_functionParameter_generic()
+ throws Exception {
+ Source source = addSource(createSource(//
+ "class A<K, V> {",
+ " m(f(K k), V v) {",
+ " f(v);",
+ " }",
+ "}"));
+ resolve(source);
+ assertErrors(source, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+ verify(source);
+ }
+
public void test_argumentTypeNotAssignable_invocation_functionTypes_optional() throws Exception {
Source source = addSource(createSource(//
"void acceptFunNumOptBool(void funNumOptBool([bool b])) {}",

Powered by Google App Engine
This is Rietveld 408576698