| Index: tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
|
| diff --git a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
|
| index fb8ea18dfc5bc712ef215e971f9a024bd1761f8f..f17308b62120e47e5418a0e6aa5501bccc06fe6a 100644
|
| --- a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
|
| +++ b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
|
| @@ -4,8 +4,7 @@
|
|
|
| import 'package:expect/expect.dart';
|
| import "package:async_helper/async_helper.dart";
|
| -import 'package:compiler/src/types/types.dart'
|
| - show TypeMask;
|
| +import 'package:compiler/src/types/types.dart' show TypeMask;
|
|
|
| import 'compiler_helper.dart';
|
| import 'type_mask_test_helper.dart';
|
| @@ -164,36 +163,39 @@ main() {
|
| }
|
| """;
|
|
|
| -
|
| void main() {
|
| Uri uri = new Uri(scheme: 'source');
|
| var compiler = compilerFor(TEST, uri);
|
| asyncTest(() => compiler.run(uri).then((_) {
|
| - var commonMasks = compiler.commonMasks;
|
| - var typesInferrer = compiler.globalInference.typesInferrer;
|
| -
|
| - checkReturn(String name, type) {
|
| - var element = findElement(compiler, name);
|
| - Expect.equals(type,
|
| - simplify(typesInferrer.getReturnTypeOfElement(element), compiler));
|
| - }
|
| -
|
| - checkReturn('returnInt1', commonMasks.uint31Type);
|
| - checkReturn('returnInt2', commonMasks.uint31Type);
|
| - checkReturn('returnInt3', commonMasks.uint31Type);
|
| - checkReturn('returnInt4', commonMasks.uint31Type);
|
| - checkReturn('returnInt5', commonMasks.uint31Type);
|
| - checkReturn('returnInt6', new TypeMask.nonNullSubtype(
|
| - compiler.coreClasses.intClass, compiler.world));
|
| -
|
| - var subclassOfInterceptor =
|
| - findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
|
| -
|
| - checkReturn('returnDyn1', subclassOfInterceptor);
|
| - checkReturn('returnDyn2', subclassOfInterceptor);
|
| - checkReturn('returnDyn3', subclassOfInterceptor);
|
| - checkReturn('returnDyn4', subclassOfInterceptor);
|
| - checkReturn('returnDyn5', subclassOfInterceptor);
|
| - checkReturn('returnDyn6', commonMasks.dynamicType);
|
| - }));
|
| + var commonMasks = compiler.commonMasks;
|
| + var typesInferrer = compiler.globalInference.typesInferrer;
|
| +
|
| + checkReturn(String name, type) {
|
| + var element = findElement(compiler, name);
|
| + Expect.equals(
|
| + type,
|
| + simplify(
|
| + typesInferrer.getReturnTypeOfElement(element), compiler));
|
| + }
|
| +
|
| + checkReturn('returnInt1', commonMasks.uint31Type);
|
| + checkReturn('returnInt2', commonMasks.uint31Type);
|
| + checkReturn('returnInt3', commonMasks.uint31Type);
|
| + checkReturn('returnInt4', commonMasks.uint31Type);
|
| + checkReturn('returnInt5', commonMasks.uint31Type);
|
| + checkReturn(
|
| + 'returnInt6',
|
| + new TypeMask.nonNullSubtype(
|
| + compiler.coreClasses.intClass, compiler.world));
|
| +
|
| + var subclassOfInterceptor =
|
| + findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
|
| +
|
| + checkReturn('returnDyn1', subclassOfInterceptor);
|
| + checkReturn('returnDyn2', subclassOfInterceptor);
|
| + checkReturn('returnDyn3', subclassOfInterceptor);
|
| + checkReturn('returnDyn4', subclassOfInterceptor);
|
| + checkReturn('returnDyn5', subclassOfInterceptor);
|
| + checkReturn('returnDyn6', commonMasks.dynamicType);
|
| + }));
|
| }
|
|
|