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

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

Issue 10837095: Refactor scope handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/resolver_test.dart
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index b728f53eafc347751b585090402be74e545e06d4..b6044da86b667d5cab6eff2c330124f813c8201e 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -42,7 +42,7 @@ testLocals(List variables) {
final name = variable[0];
Identifier id = buildIdentifier(name);
final VariableElement variableElement = visitor.visit(id);
- MethodScope scope = visitor.context;
+ MethodScope scope = visitor.scope;
Expect.equals(variableElement, scope.elements[buildSourceString(name)]);
}
return compiler;
@@ -216,7 +216,7 @@ testLocalsTwo() {
Node tree = parseStatement("if (true) { var a = 1; var b = 2; }");
Element element = visitor.visit(tree);
Expect.equals(null, element);
- BlockScope scope = visitor.context;
+ BlockScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
Expect.equals(2, map(visitor).length);
@@ -230,7 +230,7 @@ testLocalsThree() {
Node tree = parseStatement("{ var a = 1; if (true) { a; } }");
Element element = visitor.visit(tree);
Expect.equals(null, element);
- BlockScope scope = visitor.context;
+ BlockScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
Expect.equals(3, map(visitor).length);
List<Element> elements = map(visitor).getValues();
@@ -243,7 +243,7 @@ testLocalsFour() {
Node tree = parseStatement("{ var a = 1; if (true) { var a = 1; } }");
Element element = visitor.visit(tree);
Expect.equals(null, element);
- BlockScope scope = visitor.context;
+ BlockScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
Expect.equals(2, map(visitor).length);
List<Element> elements = map(visitor).getValues();
@@ -256,7 +256,7 @@ testLocalsFive() {
If tree = parseStatement("if (true) { var a = 1; a; } else { var a = 2; a;}");
Element element = visitor.visit(tree);
Expect.equals(null, element);
- BlockScope scope = visitor.context;
+ BlockScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
Expect.equals(6, map(visitor).length);
@@ -302,7 +302,7 @@ testFor() {
For tree = parseStatement("for (int i = 0; i < 10; i = i + 1) { i = 5; }");
visitor.visit(tree);
- BlockScope scope = visitor.context;
+ BlockScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
Expect.equals(10, map(visitor).length);
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698