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 5104e2e5dc0a0e5852e845fb2791bf4b958c9d16..8e4a7145a3ad7f428c4b670d6955a01313865741 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 |
@@ -2189,6 +2189,21 @@ public class StaticWarningCodeTest extends ResolverTestCase { |
verify(source); |
} |
+ public void test_typePromotion_functionType_arg_InterToDyn() throws Exception { |
+ Source source = addSource(createSource(// |
+ "typedef FuncDyn(x);", |
+ "typedef FuncA(A a);", |
+ "class A {}", |
+ "class B {}", |
+ "main(FuncA f) {", |
+ " if (f is FuncDyn) {", // ignored: dynamic !<< A |
+ " f(new B());", |
+ " }", |
+ "}")); |
+ resolve(source); |
+ assertErrors(source, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE); |
+ } |
+ |
public void test_typeTestNonType() throws Exception { |
Source source = addSource(createSource(// |
"var A = 0;", |