OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 import 'package:async_helper/async_helper.dart'; |
| 6 import 'inference_test_helper.dart'; |
| 7 |
| 8 const List<String> TESTS = const <String>[ |
| 9 ''' |
| 10 class Super { |
| 11 var field = 42; |
| 12 } |
| 13 class Sub extends Super { |
| 14 method() { |
| 15 var a = super.field = new Sub(); |
| 16 return a.@{[exact=Sub]}method; |
| 17 } |
| 18 } |
| 19 main() { |
| 20 new Sub().@{[exact=Sub]}method(); |
| 21 } |
| 22 ''', |
| 23 ]; |
| 24 |
| 25 main() { |
| 26 asyncTest(() async { |
| 27 for (String annotatedCode in TESTS) { |
| 28 await checkCode(annotatedCode); |
| 29 } |
| 30 }); |
| 31 } |
OLD | NEW |