| 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 d7ffbc5f49f3b86cad0d85314272526649bab438..552f0b54d5517983dc3328eeb2a39adaaa427e04 100644
|
| --- a/tests/language_strong/covariant_subtyping_test.dart
|
| +++ b/tests/language_strong/covariant_subtyping_test.dart
|
| @@ -93,6 +93,15 @@ testReturnOfFunctionType() {
|
| Expect.equals(cObj.getT(), 42);
|
| }
|
|
|
| +testTearoffReturningFunctionType() {
|
| + FnChecks<int> cInt = new FnChecks<int>();
|
| + FnChecks<Object> cObj = cInt;
|
| +
|
| + Expect.throws(
|
| + () => cObj.setterForT, isTypeError, 'unsound tear-off throws at runtime');
|
| + Expect.equals(cInt.setterForT, cInt.setterForT, 'sound tear-off works');
|
| +}
|
| +
|
| testFieldOfFunctionType() {
|
| FnChecks<Object> c = new FnChecks<String>()..f = (String b) {};
|
| Expect.throws(() {
|
| @@ -217,6 +226,7 @@ main() {
|
| testPrivateFields();
|
| testClassBounds();
|
| testReturnOfFunctionType();
|
| + testTearoffReturningFunctionType();
|
| testFieldOfFunctionType();
|
| testFieldOfGenericFunctionType();
|
| testMixinApplication();
|
|
|