| Index: tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
|
| diff --git a/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart b/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
|
| similarity index 63%
|
| copy from tests/compiler/dart2js/simple_inferrer_const_closure_test.dart
|
| copy to tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
|
| index 7b7be1a6da440c65728f34c064aa84760dbc9292..d8bdeb37f35c9874dad70544130620c55f3e5987 100644
|
| --- a/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart
|
| +++ b/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
|
| @@ -8,28 +8,19 @@ import 'compiler_helper.dart';
|
|
|
| const String TEST = """
|
|
|
| -method1() {
|
| - return 42;
|
| -}
|
| -
|
| -method2(a) { // Called only via [foo2] with a small integer.
|
| +method(a) { // Called via [foo] with integer then double.
|
| return a;
|
| }
|
|
|
| -const foo1 = method1;
|
| -const foo2 = method2;
|
| +const foo = method;
|
|
|
| -returnInt1() {
|
| - return foo1();
|
| -}
|
| -
|
| -returnInt2() {
|
| - return foo2(54);
|
| +returnNum(x) {
|
| + return foo(x);
|
| }
|
|
|
| main() {
|
| - returnInt1();
|
| - returnInt2();
|
| + returnNum(10);
|
| + returnNum(10.5);
|
| }
|
| """;
|
|
|
| @@ -47,10 +38,7 @@ void main() {
|
| name);
|
| }
|
|
|
| - checkReturn('method1', compiler.typesTask.uint31Type);
|
| - checkReturn('returnInt1', compiler.typesTask.uint31Type);
|
| -
|
| - checkReturn('method2', compiler.typesTask.uint31Type);
|
| - checkReturn('returnInt2', compiler.typesTask.uint31Type);
|
| + checkReturn('method', compiler.typesTask.numType);
|
| + checkReturn('returnNum', compiler.typesTask.numType);
|
| }));
|
| }
|
|
|