Chromium Code Reviews| Index: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
| diff --git a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
| index fd3572443d2b4e3c3aa78828a2afc993b4265203..7bd194d1649c3133115446cdb8ed186057fc5a6b 100644 |
| --- a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
| +++ b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart |
| @@ -50,6 +50,7 @@ const List<Test> TESTS = const <Test>[ |
| const Test(const { |
| 'main.dart': ''' |
| import 'dart:html'; |
| +import 'package:expect/expect.dart'; |
| foo({named}) => 1; |
| bar(a) => !a; |
| @@ -71,6 +72,8 @@ class SubClass extends Class { |
| } |
| } |
| +class Generic<T> {} |
|
sra1
2017/07/11 21:46:25
This could be a separate test.
Johnni Winther
2017/07/12 07:51:30
Actually, I needed a generic class to trigger the
|
| + |
| var toplevel; |
| main() { |
| @@ -123,9 +126,19 @@ main() { |
| break; |
| } |
| x = toplevel; |
| + x = testIs(x); |
| + x = testAsGeneric(x); |
| + x = testAsFunction(x); |
| print(x); |
| return x; |
| } |
| +typedef NoArg(); |
| +@NoInline() |
| +testIs(o) => o is Generic<int> || o is NoArg; |
| +@NoInline() |
| +testAsGeneric(o) => o as Generic<int>; |
| +@NoInline() |
| +testAsFunction(o) => o as NoArg; |
| ''' |
| }), |
| const Test(const { |