Index: tests/lib_2/async/future_or_bad_type_test.dart |
diff --git a/tests/lib_strong/async/future_or_bad_type_test.dart b/tests/lib_2/async/future_or_bad_type_test.dart |
similarity index 65% |
rename from tests/lib_strong/async/future_or_bad_type_test.dart |
rename to tests/lib_2/async/future_or_bad_type_test.dart |
index eb0933ae544374ebf7d2408e0c7939de677caf63..fc47e02288a91b40639e6e4edd7636f7a42a630f 100644 |
--- a/tests/lib_strong/async/future_or_bad_type_test.dart |
+++ b/tests/lib_2/async/future_or_bad_type_test.dart |
@@ -10,17 +10,15 @@ import 'dart:async'; |
import 'package:expect/expect.dart'; |
class A |
- extends FutureOr<String> // //# extends: compile-time error |
- extends Object with FutureOr<bool> // //# with: compile-time error |
- implements FutureOr<int> // //# implements: compile-time error |
+ extends FutureOr<String> //# extends: compile-time error |
+ extends Object with FutureOr<bool> //# with: compile-time error |
+ implements FutureOr<int> //# implements: ok |
Bob Nystrom
2017/08/16 22:27:20
Why is this OK now? Isn't it an error to implement
bkonyi
2017/08/16 23:44:13
I thought so, but apparently this doesn't fail any
Bob Nystrom
2017/08/16 23:47:32
I think it should be failing. If an implementation
|
{} |
main() { |
// FutureOr<T> should be treated like `dynamic`. Dynamically the `T` is |
// completely ignored. It can be a malformed type. |
Bob Nystrom
2017/08/16 22:27:20
This is testing the old 1.0 behavior. In 2.0, it s
bkonyi
2017/08/16 23:44:13
Done.
|
Expect.isTrue(499 is FutureOr<A>); |
- Expect.isTrue(499 is FutureOr<Does<Not<Exist>>>); // //# 00: static type warning |
- Expect.isTrue(499 is FutureOr<A, A>); // //# 01: static type warning |
var a = new A(); |
Expect.isTrue(a.toString() is String); |