Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 10834061: Resolve typedefs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated scope handling and type resolution Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 97bbadec3c2512056ff188628aa5989eb7a3e8b4..e7d92281816c64b246d9fb1b540cb97c0527c108 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -124,11 +124,11 @@ class MockCompiler extends Compiler {
TreeElementMapping resolveNodeStatement(Node tree, Element element) {
ResolverVisitor visitor = new ResolverVisitor(this, element);
- if (visitor.context is TopScope) {
- visitor.context = new BlockScope(visitor.context);
+ if (visitor.scope is TopScope) {
+ visitor.scope = new BlockScope(visitor.scope);
}
visitor.visit(tree);
- visitor.context = new TopScope(element.getLibrary());
+ visitor.scope = new TopScope(element.getLibrary());
// Resolve the type annotations encountered in the code.
while (!resolver.toResolve.isEmpty()) {
resolver.toResolve.removeFirst().ensureResolved(this);
@@ -140,7 +140,7 @@ class MockCompiler extends Compiler {
Element mockElement =
new Element(buildSourceString(''), ElementKind.FUNCTION, mainApp);
ResolverVisitor visitor = new ResolverVisitor(this, mockElement);
- visitor.context = new BlockScope(visitor.context);
+ visitor.scope = new BlockScope(visitor.scope);
return visitor;
}

Powered by Google App Engine
This is Rietveld 408576698