| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.test.src.task.strong.checker_test; | 5 library analyzer.test.src.task.strong.checker_test; |
| 6 | 6 |
| 7 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 7 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 8 | 8 |
| 9 import 'strong_test_helper.dart'; | 9 import 'strong_test_helper.dart'; |
| 10 | 10 |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 test_functionModifiers_async() async { | 915 test_functionModifiers_async() async { |
| 916 await checkFile(''' | 916 await checkFile(''' |
| 917 import 'dart:async'; | 917 import 'dart:async'; |
| 918 import 'dart:math' show Random; | 918 import 'dart:math' show Random; |
| 919 | 919 |
| 920 dynamic x; | 920 dynamic x; |
| 921 | 921 |
| 922 foo1() async => x; | 922 foo1() async => x; |
| 923 Future foo2() async => x; | 923 Future foo2() async => x; |
| 924 Future<int> foo3() async => /*info:DYNAMIC_CAST*/x; | 924 Future<int> foo3() async => /*info:DYNAMIC_CAST*/x; |
| 925 Future<int> foo4() async => new Future<int>.value(x); | 925 Future<int> foo4() async => new Future<int>.value(/*info:DYNAMIC_CAST*/x); |
| 926 Future<int> foo5() async => | 926 Future<int> foo5() async => |
| 927 /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x); | 927 /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value( |
| 928 /*info:DYNAMIC_CAST*/x); |
| 928 | 929 |
| 929 bar1() async { return x; } | 930 bar1() async { return x; } |
| 930 Future bar2() async { return x; } | 931 Future bar2() async { return x; } |
| 931 Future<int> bar3() async { return /*info:DYNAMIC_CAST*/x; } | 932 Future<int> bar3() async { return /*info:DYNAMIC_CAST*/x; } |
| 932 Future<int> bar4() async { return new Future<int>.value(x); } | 933 Future<int> bar4() async { |
| 934 return new Future<int>.value(/*info:DYNAMIC_CAST*/x); |
| 935 } |
| 933 Future<int> bar5() async { | 936 Future<int> bar5() async { |
| 934 return /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x); | 937 return /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value( |
| 938 /*info:DYNAMIC_CAST*/x); |
| 935 } | 939 } |
| 936 | 940 |
| 937 int y; | 941 int y; |
| 938 Future<int> z; | 942 Future<int> z; |
| 939 | 943 |
| 940 baz() async { | 944 baz() async { |
| 941 int a = /*info:DYNAMIC_CAST*/await x; | 945 int a = /*info:DYNAMIC_CAST*/await x; |
| 942 int b = await y; | 946 int b = await y; |
| 943 int c = await z; | 947 int c = await z; |
| 944 String d = /*error:INVALID_ASSIGNMENT*/await z; | 948 String d = /*error:INVALID_ASSIGNMENT*/await z; |
| (...skipping 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4203 class CheckerTest_Driver extends CheckerTest { | 4207 class CheckerTest_Driver extends CheckerTest { |
| 4204 @override | 4208 @override |
| 4205 bool get enableNewAnalysisDriver => true; | 4209 bool get enableNewAnalysisDriver => true; |
| 4206 | 4210 |
| 4207 @failingTest | 4211 @failingTest |
| 4208 @override | 4212 @override |
| 4209 test_covariantOverride_fields() async { | 4213 test_covariantOverride_fields() async { |
| 4210 await super.test_covariantOverride_fields(); | 4214 await super.test_covariantOverride_fields(); |
| 4211 } | 4215 } |
| 4212 } | 4216 } |
| OLD | NEW |