| Index: tests/language_strong/covariant_subtyping_tearoff1_test.dart
|
| diff --git a/tests/language_strong/covariant_subtyping_unsafe_call1_test.dart b/tests/language_strong/covariant_subtyping_tearoff1_test.dart
|
| similarity index 65%
|
| copy from tests/language_strong/covariant_subtyping_unsafe_call1_test.dart
|
| copy to tests/language_strong/covariant_subtyping_tearoff1_test.dart
|
| index 79fced239fae75c0396c9b98a9c4bf2c5d9d7b56..404b4bbdeb54494094630cd94df51404be1ca667 100644
|
| --- a/tests/language_strong/covariant_subtyping_unsafe_call1_test.dart
|
| +++ b/tests/language_strong/covariant_subtyping_tearoff1_test.dart
|
| @@ -4,11 +4,16 @@
|
| import 'package:expect/expect.dart';
|
|
|
| class Foo<T> {
|
| - method(T x) {}
|
| + dynamic method(T x) {}
|
| }
|
|
|
| +typedef dynamic TakeNum(num x);
|
| +
|
| main() {
|
| Foo<int> intFoo = new Foo<int>();
|
| Foo<num> numFoo = intFoo;
|
| - Expect.throws(() => numFoo.method(2.5));
|
| + TakeNum f = numFoo.method;
|
| + Expect.throws(() => f(2.5));
|
| + dynamic f2 = numFoo.method;
|
| + Expect.throws(() => f2(2.5));
|
| }
|
|
|