Chromium Code Reviews| Index: pkg/analyzer/test/src/task/strong/checker_test.dart |
| diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart |
| index 4ac3e49b826f8e83da769e4ed2850a9a84ac4bc8..c6e7e4534beceb9a00dc43932a71dfcecbc8a60e 100644 |
| --- a/pkg/analyzer/test/src/task/strong/checker_test.dart |
| +++ b/pkg/analyzer/test/src/task/strong/checker_test.dart |
| @@ -921,14 +921,14 @@ dynamic x; |
| foo1() async => x; |
| Future foo2() async => x; |
| -Future<int> foo3() async => x; |
| +Future<int> foo3() async => /*info:DYNAMIC_CAST*/x; |
| Future<int> foo4() async => new Future<int>.value(x); |
| Future<int> foo5() async => |
| /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x); |
| bar1() async { return x; } |
| Future bar2() async { return x; } |
| -Future<int> bar3() async { return x; } |
| +Future<int> bar3() async { return /*info:DYNAMIC_CAST*/x; } |
| Future<int> bar4() async { return new Future<int>.value(x); } |
| Future<int> bar5() async { |
| return /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x); |
| @@ -955,7 +955,7 @@ Future<bool> get issue_ddc_264 async { |
| Future<String> issue_sdk_26404() async { |
| - return (1 > 0) ? new Future<String>.value('hello') : "world"; |
| + return (/*info:DOWN_CAST_COMPOSITE*/(1 > 0) ? new Future<String>.value('hello') : "world"); |
|
vsm
2017/04/05 15:52:59
FYI - this is a cast from Object to FutureOr<Strin
Leaf
2017/04/05 20:47:27
The fact that the LUB is Object is WAI. The conse
vsm
2017/04/07 22:23:07
Makes sense. Yes, it'll work - just unnecessary c
|
| } |
| '''); |
| } |