Index: tests/compiler/dart2js/field_type_simple_inferer_test.dart |
diff --git a/tests/compiler/dart2js/field_type_simple_inferer_test.dart b/tests/compiler/dart2js/field_type_simple_inferer_test.dart |
index 1b5c87fe79fcb4efd944651c561077fa240e5845..6555838f9b43dec856c8e9f514a6856c1b878a87 100644 |
--- a/tests/compiler/dart2js/field_type_simple_inferer_test.dart |
+++ b/tests/compiler/dart2js/field_type_simple_inferer_test.dart |
@@ -2,6 +2,7 @@ |
// 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 'dart:async'; |
import 'package:expect/expect.dart'; |
import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' |
show TypeMask; |
@@ -15,12 +16,13 @@ void compileAndFind(String code, |
bool disableInlining, |
check(compiler, element)) { |
Uri uri = new Uri(scheme: 'source'); |
- var compiler = compilerFor(code, uri); |
- compiler.runCompiler(uri); |
- compiler.disableInlining = disableInlining; |
- var cls = findElement(compiler, className); |
- var member = cls.lookupMember(buildSourceString(memberName)); |
- return check(compiler.typesTask.typesInferrer, member); |
+ MockCompiler compiler = compilerFor(code, uri); |
+ compiler.runCompiler(uri).then((_) { |
+ compiler.disableInlining = disableInlining; |
+ var cls = findElement(compiler, className); |
+ var member = cls.lookupMember(buildSourceString(memberName)); |
+ check(compiler.typesTask.typesInferrer, member); |
+ }); |
} |
const String TEST_1 = r""" |