| Index: tests/language_strong/covariant_subtyping_test.dart
|
| diff --git a/tests/language_strong/covariant_subtyping_test.dart b/tests/language_strong/covariant_subtyping_test.dart
|
| index 552f0b54d5517983dc3328eeb2a39adaaa427e04..c17b23dc4ce1f63164ffb08877fbe9dc631b50d9 100644
|
| --- a/tests/language_strong/covariant_subtyping_test.dart
|
| +++ b/tests/language_strong/covariant_subtyping_test.dart
|
| @@ -221,6 +221,32 @@ testCallMethod() {
|
| }, isTypeError);
|
| }
|
|
|
| +class TearOff<T> {
|
| + method1(T t) => null; // needs check
|
| + method2(Function(T) takesT) => null;
|
| + method3(T Function() returnsT) => null; // needs check
|
| + method4(Function(Function(T)) takesTakesT) => null; // needs check
|
| + method5(Function(T Function()) takesReturnsT) => null;
|
| + method6(Function(T) Function() returnsTakesT) => null;
|
| + method7(T Function() Function() returnsReturnsT) => null; // needs check
|
| +}
|
| +
|
| +testTearOffRuntimeType() {
|
| + expectRTTI(tearoff, type) => Expect.equals('${tearoff.runtimeType}', type,
|
| + 'covariant params should reify with Object as their type');
|
| +
|
| + TearOff<num> t = new TearOff<int>();
|
| + expectRTTI(t.method1, '(Object) -> dynamic');
|
| +
|
| + expectRTTI(t.method2, '((int) -> dynamic) -> dynamic');
|
| + expectRTTI(t.method3, '(Object) -> dynamic');
|
| +
|
| + expectRTTI(t.method4, '(Object) -> dynamic');
|
| + expectRTTI(t.method5, '((() -> int) -> dynamic) -> dynamic');
|
| + expectRTTI(t.method6, '(() -> (int) -> dynamic) -> dynamic');
|
| + expectRTTI(t.method7, '(Object) -> dynamic');
|
| +}
|
| +
|
| main() {
|
| testField();
|
| testPrivateFields();
|
| @@ -232,4 +258,5 @@ main() {
|
| testMixinApplication();
|
| testGenericMethodBounds();
|
| testCallMethod();
|
| + testTearOffRuntimeType();
|
| }
|
|
|