| Index: tests/language_strong/async_return_types_test.dart
|
| diff --git a/tests/language_2/async_return_types_test.dart b/tests/language_strong/async_return_types_test.dart
|
| similarity index 59%
|
| rename from tests/language_2/async_return_types_test.dart
|
| rename to tests/language_strong/async_return_types_test.dart
|
| index eae381b19112164da26fa11a218a0a362ba77ead..f763c090f5cd6cbf3d464f0347640d05900853f4 100644
|
| --- a/tests/language_2/async_return_types_test.dart
|
| +++ b/tests/language_strong/async_return_types_test.dart
|
| @@ -14,17 +14,18 @@ Future<int> foo2() async {
|
| return 3;
|
| }
|
|
|
| -Future<int> //# wrongTypeParameter: compile-time error
|
| +Future<int> //# wrongTypeParameter: static type warning
|
| foo3() async {
|
| return "String";
|
| }
|
|
|
| -Future<int, String> //# tooManyTypeParameters: compile-time error
|
| +// Future<int, String> is treated like Future<dynamic>
|
| +Future<int, String> //# tooManyTypeParameters: static type warning
|
| foo4() async {
|
| return "String";
|
| }
|
|
|
| -int //# wrongReturnType: compile-time error
|
| +int //# wrongReturnType: static type warning, dynamic type error
|
| foo5() async {
|
| return 3;
|
| }
|
| @@ -34,27 +35,11 @@ Future<int> foo6() async {
|
| return new Future<int>.value(3);
|
| }
|
|
|
| -Future<Future<int>> //# nestedFuture: compile-time error
|
| +Future<Future<int>> //# nestedFuture: static type warning
|
| foo7() async {
|
| return new Future<int>.value(3);
|
| }
|
|
|
| -Iterable<int> foo8() sync* {
|
| - yield 1;
|
| - // Can only have valueless return in sync* functions.
|
| - return
|
| - 8 //# return_value_sync_star: compile-time error
|
| - ;
|
| -}
|
| -
|
| -Stream<int> foo9() async* {
|
| - yield 1;
|
| - // Can only have valueless return in async* functions.
|
| - return
|
| - 8 //# return_value_sync_star: compile-time error
|
| - ;
|
| -}
|
| -
|
| test() async {
|
| Expect.equals(3, await foo1());
|
| Expect.equals(3, await foo2());
|
| @@ -63,8 +48,6 @@ test() async {
|
| Expect.equals(3, await foo5());
|
| Expect.equals(3, await await foo6());
|
| Expect.equals(3, await await foo7());
|
| - Expect.listEquals([1], foo8().toList());
|
| - Expect.listEquals([1], await foo9().toList());
|
| }
|
|
|
| main() {
|
|
|