| Index: tests/compiler/dart2js/compiler_helper.dart
|
| diff --git a/tests/compiler/dart2js/compiler_helper.dart b/tests/compiler/dart2js/compiler_helper.dart
|
| index 42ed72aba75acb4b338c8456c94081242532aeb3..c49d1182659f32b0d48689d2c357f6b76cd61cb0 100644
|
| --- a/tests/compiler/dart2js/compiler_helper.dart
|
| +++ b/tests/compiler/dart2js/compiler_helper.dart
|
| @@ -9,7 +9,7 @@ import "package:expect/expect.dart";
|
|
|
| import 'package:compiler/compiler_new.dart';
|
|
|
| -import 'package:compiler/src/elements/elements.dart' as lego;
|
| +import 'package:compiler/src/elements/elements.dart';
|
| export 'package:compiler/src/elements/elements.dart';
|
|
|
| import 'package:compiler/src/js_backend/js_backend.dart' as js;
|
| @@ -22,7 +22,6 @@ export 'package:compiler/src/diagnostics/messages.dart';
|
| export 'package:compiler/src/diagnostics/source_span.dart';
|
| export 'package:compiler/src/diagnostics/spannable.dart';
|
|
|
| -import 'package:compiler/src/types/types.dart' as types;
|
| export 'package:compiler/src/types/types.dart' show TypeMask;
|
|
|
| import 'package:compiler/src/util/util.dart';
|
| @@ -71,7 +70,8 @@ Future<String> compile(String code,
|
| outputProvider: outputCollector);
|
| await compiler.init();
|
| compiler.parseScript(code);
|
| - lego.Element element = compiler.mainApp.find(entry);
|
| + LibraryElement mainApp = compiler.mainApp;
|
| + MethodElement element = mainApp.find(entry);
|
| if (element == null) return null;
|
| compiler.phase = Compiler.PHASE_RESOLVING;
|
| compiler.processQueue(compiler.enqueuer.resolution, element,
|
| @@ -121,7 +121,8 @@ Future<String> compile(String code,
|
| outputProvider: outputCollector);
|
| Expect.isTrue(result.isSuccess);
|
| Compiler compiler = result.compiler;
|
| - lego.Element element = compiler.mainApp.find(entry);
|
| + LibraryElement mainApp = compiler.mainApp;
|
| + Element element = mainApp.find(entry);
|
| js.JavaScriptBackend backend = compiler.backend;
|
| String generated = backend.getGeneratedCode(element);
|
| if (check != null) {
|
| @@ -158,8 +159,8 @@ Future<String> compileAll(String code,
|
| });
|
| }
|
|
|
| -Future analyzeAndCheck(String code, String name,
|
| - check(MockCompiler compiler, lego.Element element),
|
| +Future analyzeAndCheck(
|
| + String code, String name, check(MockCompiler compiler, Element element),
|
| {int expectedErrors, int expectedWarnings}) {
|
| Uri uri = new Uri(scheme: 'source');
|
| MockCompiler compiler = compilerFor(code, uri,
|
| @@ -167,7 +168,7 @@ Future analyzeAndCheck(String code, String name,
|
| expectedWarnings: expectedWarnings,
|
| analyzeOnly: true);
|
| return compiler.run(uri).then((_) {
|
| - lego.Element element = findElement(compiler, name);
|
| + Element element = findElement(compiler, name);
|
| return check(compiler, element);
|
| });
|
| }
|
| @@ -189,8 +190,8 @@ Future compileSources(
|
| });
|
| }
|
|
|
| -lego.Element findElement(compiler, String name, [Uri library]) {
|
| - lego.LibraryElement lib = compiler.mainApp;
|
| +Element findElement(compiler, String name, [Uri library]) {
|
| + LibraryElement lib = compiler.mainApp;
|
| if (library != null) {
|
| lib = compiler.libraryLoader.lookupLibrary(library);
|
| Expect.isNotNull(lib, 'Could not locate library $library.');
|
|
|