Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart |
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart |
index 65686c5511a6f7227aec225fda3d709d1a2e82d8..35c31afc740412c2d9a0cfe268df11b4542fa5aa 100644 |
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart |
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart |
@@ -696,6 +696,26 @@ main() { |
'C<dynamic>'); |
} |
+ test_constructors_inferFromArguments_argumentNotAssignable() async { |
+ var unit = await checkFileElement(''' |
+class A {} |
+ |
+typedef T F<T>(); |
+ |
+class C<T extends A> { |
+ C(F<T> f); |
+} |
+ |
+class NotA {} |
+NotA myF() => null; |
+ |
+var V = /*info:INFERRED_TYPE_ALLOCATION*/new |
+ /*error:COULD_NOT_INFER*/C(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/myF); |
+'''); |
+ var vars = unit.topLevelVariables; |
+ expect(vars[0].type.toString(), 'C<A>'); |
+ } |
+ |
test_constructors_inferFromArguments_const() async { |
var unit = await checkFileElement(''' |
class C<T> { |