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

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

Issue 1933403002: Revert "Implements support for ignoring method type arguments in resolution." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 2e1868a804fa7a5e1487becd01f106384d70a68f..6067a6c499c69632bef43662aff5cb91a8da0d1b 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -222,11 +222,10 @@ Future testSuperCalls() {
ClassElement classA = compiler.mainApp.find("A");
FunctionElement fooA = classA.lookupLocalMember("foo");
- ResolverVisitor visitor = new ResolverVisitor(
- compiler,
- fooB,
- new ResolutionRegistry(compiler, new CollectingTreeElements(fooB)),
- scope: new MockTypeVariablesScope(classB.buildScope()));
+ ResolverVisitor visitor =
+ new ResolverVisitor(compiler, fooB,
+ new ResolutionRegistry(compiler,
+ new CollectingTreeElements(fooB)));
FunctionExpression node =
(fooB as FunctionElementX).parseNode(compiler.parsingContext);
visitor.visit(node.body);
@@ -267,12 +266,10 @@ Future testThis() {
compiler.resolveStatement("Foo foo;");
ClassElement fooElement = compiler.mainApp.find("Foo");
FunctionElement funElement = fooElement.lookupLocalMember("foo");
- ResolverVisitor visitor = new ResolverVisitor(
- compiler,
- funElement,
- new ResolutionRegistry(
- compiler, new CollectingTreeElements(funElement)),
- scope: new MockTypeVariablesScope(fooElement.buildScope()));
+ ResolverVisitor visitor =
+ new ResolverVisitor(compiler, funElement,
+ new ResolutionRegistry(compiler,
+ new CollectingTreeElements(funElement)));
FunctionExpression function =
(funElement as FunctionElementX).parseNode(compiler.parsingContext);
visitor.visit(function.body);
@@ -295,12 +292,9 @@ Future testThis() {
compiler.resolveStatement("Foo foo;");
ClassElement fooElement = compiler.mainApp.find("Foo");
FunctionElement funElement = fooElement.lookupLocalMember("foo");
- ResolverVisitor visitor = new ResolverVisitor(
- compiler,
- funElement,
- new ResolutionRegistry(
- compiler, new CollectingTreeElements(funElement)),
- scope: new MockTypeVariablesScope(fooElement.buildScope()));
+ ResolverVisitor visitor = new ResolverVisitor(compiler, funElement,
+ new ResolutionRegistry(compiler,
+ new CollectingTreeElements(funElement)));
FunctionExpression function =
(funElement as FunctionElementX).parseNode(compiler.parsingContext);
visitor.visit(function.body);
@@ -587,10 +581,10 @@ Future testOneInterface() {
// correctly.
compiler.parseScript("abstract class Bar {}");
- ResolverVisitor visitor = new ResolverVisitor(
- compiler,
- null,
- new ResolutionRegistry(compiler, new CollectingTreeElements(null)));
+ ResolverVisitor visitor =
+ new ResolverVisitor(compiler, null,
+ new ResolutionRegistry(compiler,
+ new CollectingTreeElements(null)));
compiler.resolveStatement("Foo bar;");
ClassElement fooElement = compiler.mainApp.find('Foo');
@@ -625,6 +619,7 @@ Future testTwoInterfaces() {
Future testFunctionExpression() {
return MockCompiler.create((MockCompiler compiler) {
+ ResolverVisitor visitor = compiler.resolverVisitor();
Map mapping = compiler.resolveStatement("int f() {}").map;
Expect.equals(2, mapping.length);
Element element;
@@ -706,11 +701,10 @@ Future resolveConstructor(
Element element;
element = classElement.lookupConstructor(constructor);
FunctionExpression tree = (element as FunctionElement).node;
- ResolverVisitor visitor = new ResolverVisitor(
- compiler,
- element,
- new ResolutionRegistry(compiler, new CollectingTreeElements(element)),
- scope: classElement.buildScope());
+ ResolverVisitor visitor =
+ new ResolverVisitor(compiler, element,
+ new ResolutionRegistry(compiler,
+ new CollectingTreeElements(element)));
new InitializerResolver(visitor, element, tree).resolveInitializers();
visitor.visit(tree.body);
Expect.equals(expectedElementCount, 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