| 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 // TODO(jmesserly): this file needs to be refactored, it's a port from | 5 // TODO(jmesserly): this file needs to be refactored, it's a port from |
| 6 // package:dev_compiler's tests | 6 // package:dev_compiler's tests |
| 7 /// General type checking tests | 7 /// General type checking tests |
| 8 library test.src.task.strong.checker_test; | 8 library analyzer.test.src.task.strong.checker_test; |
| 9 | 9 |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| 11 | 11 |
| 12 import 'strong_test_helper.dart'; | 12 import 'strong_test_helper.dart'; |
| 13 | 13 |
| 14 void main() { | 14 void main() { |
| 15 testChecker('ternary operator', { | 15 testChecker('ternary operator', { |
| 16 '/main.dart': ''' | 16 '/main.dart': ''' |
| 17 abstract class Comparable<T> { | 17 abstract class Comparable<T> { |
| 18 int compareTo(T other); | 18 int compareTo(T other); |
| (...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2469 | 2469 |
| 2470 baz1() sync* { yield* (/*info:DYNAMIC_CAST*/x); } | 2470 baz1() sync* { yield* (/*info:DYNAMIC_CAST*/x); } |
| 2471 Iterable baz2() sync* { yield* (/*info:DYNAMIC_CAST*/x); } | 2471 Iterable baz2() sync* { yield* (/*info:DYNAMIC_CAST*/x); } |
| 2472 Iterable<int> baz3() sync* { yield* (/*warning:DOWN_CAST_COMPOSITE*/x);
} | 2472 Iterable<int> baz3() sync* { yield* (/*warning:DOWN_CAST_COMPOSITE*/x);
} |
| 2473 Iterable<int> baz4() sync* { yield* new Iterable<int>(); } | 2473 Iterable<int> baz4() sync* { yield* new Iterable<int>(); } |
| 2474 Iterable<int> baz5() sync* { yield* (/*info:INFERRED_TYPE_ALLOCATION*/ne
w Iterable()); } | 2474 Iterable<int> baz5() sync* { yield* (/*info:INFERRED_TYPE_ALLOCATION*/ne
w Iterable()); } |
| 2475 ''' | 2475 ''' |
| 2476 }); | 2476 }); |
| 2477 }); | 2477 }); |
| 2478 } | 2478 } |
| OLD | NEW |