Chromium Code Reviews| Index: tests/compiler/dart2js/inference/send_test.dart |
| diff --git a/tests/compiler/dart2js/inference/send_test.dart b/tests/compiler/dart2js/inference/send_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4aaae6d6df7541108a77ccf6887ca6a22c402654 |
| --- /dev/null |
| +++ b/tests/compiler/dart2js/inference/send_test.dart |
| @@ -0,0 +1,31 @@ |
| +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +import 'package:async_helper/async_helper.dart'; |
| +import 'inference_test_helper.dart'; |
| + |
| +const List<String> TESTS = const <String>[ |
|
Siggi Cherem (dart-lang)
2017/01/24 21:05:59
this would also be a great candidate for using pac
Johnni Winther
2017/01/25 13:28:14
I know :)
|
| + ''' |
| +class Super { |
| + var field = 42; |
| +} |
| +class Sub extends Super { |
| + method() { |
| + var a = super.field = new Sub(); |
| + return a.@{[exact=Sub]}method; |
|
Johnni Winther
2017/01/24 12:07:40
This test would have caught error in issue #27830.
|
| + } |
| +} |
| +main() { |
| + new Sub().@{[exact=Sub]}method(); |
| +} |
| +''', |
| +]; |
| + |
| +main() { |
| + asyncTest(() async { |
| + for (String annotatedCode in TESTS) { |
| + await checkCode(annotatedCode); |
| + } |
| + }); |
| +} |