| Index: pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart
|
| diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d76aff3dccf88f7ff87dff35860e6da8bd3ca97e
|
| --- /dev/null
|
| +++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart
|
| @@ -0,0 +1,23 @@
|
| +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +/*@testedFeatures=inference*/
|
| +library test;
|
| +
|
| +class A {}
|
| +
|
| +typedef T F<T>();
|
| +
|
| +class C<T extends A> {
|
| + C(F<T> f);
|
| +}
|
| +
|
| +class NotA {}
|
| +
|
| +NotA myF() => null;
|
| +
|
| +main() {
|
| + var /*@type=C<NotA>*/ x = /*@typeArgs=NotA*/ new /*error:COULD_NOT_INFER*/ C(
|
| + myF);
|
| +}
|
|
|