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

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

Issue 10854158: Make selector registration in the resolver and code generator more explicit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. 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
Index: tests/compiler/dart2js/type_checker_test.dart
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index f6233231ccad3d905a0460587294fd97dc40e087..6907dc0b995022c6b9e4d4d18ea97f9ef4267279 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -444,7 +444,9 @@ analyze(String text, [expectedWarnings]) {
Parser parser = new Parser(listener);
parser.parseStatement(tokens);
Node node = listener.popNode();
- TreeElements elements = compiler.resolveNodeStatement(node, compiler.mainApp);
+ Element function = new Element(
+ buildSourceString(''), ElementKind.FUNCTION, compiler.mainApp);
+ TreeElements elements = compiler.resolveNodeStatement(node, function);
TypeCheckerVisitor checker = new TypeCheckerVisitor(compiler, elements,
types);
compiler.clearWarnings();
@@ -461,6 +463,7 @@ analyzeIn(ClassElement classElement, String text, [expectedWarnings]) {
Parser parser = new Parser(listener);
parser.parseStatement(tokens);
Node node = listener.popNode();
+ classElement.ensureResolved(compiler);
TreeElements elements = compiler.resolveNodeStatement(node, classElement);
TypeCheckerVisitor checker = new TypeCheckerVisitor(compiler, elements,
types);

Powered by Google App Engine
This is Rietveld 408576698