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

Unified Diff: tests/compiler/dart2js/mock_compiler.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 | « pkg/compiler/lib/src/tree/nodes.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 59dc3da662f808682378ca42f4187823349eae3f..839c0836978295477bf4ddd274caa8bc21efbdb8 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -11,7 +11,6 @@ import 'package:compiler/compiler.dart' as api;
import 'package:compiler/src/common/names.dart' show
Uris;
import 'package:compiler/src/constants/expressions.dart';
-import 'package:compiler/src/dart_types.dart' show DartType;
import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
import 'package:compiler/src/diagnostics/source_span.dart';
import 'package:compiler/src/diagnostics/spannable.dart';
@@ -225,15 +224,10 @@ class MockCompiler extends Compiler {
TreeElementMapping resolveNodeStatement(Node tree,
ExecutableElement element) {
ResolverVisitor visitor =
- new ResolverVisitor(
- this,
- element,
+ new ResolverVisitor(this, element,
new ResolutionRegistry(this,
- new CollectingTreeElements(element)),
- scope: new MockTypeVariablesScope(
- element.enclosingElement.buildScope()));
- if (visitor.scope is LibraryScope ||
- visitor.scope is MockTypeVariablesScope) {
+ new CollectingTreeElements(element)));
+ if (visitor.scope is LibraryScope) {
visitor.scope = new MethodScope(visitor.scope, element);
}
visitor.visit(tree);
@@ -244,12 +238,9 @@ class MockCompiler extends Compiler {
resolverVisitor() {
Element mockElement = new MockElement(mainApp.entryCompilationUnit);
ResolverVisitor visitor =
- new ResolverVisitor(
- this,
- mockElement,
- new ResolutionRegistry(
- this, new CollectingTreeElements(mockElement)),
- scope: mockElement.enclosingElement.buildScope());
+ new ResolverVisitor(this, mockElement,
+ new ResolutionRegistry(this,
+ new CollectingTreeElements(mockElement)));
visitor.scope = new MethodScope(visitor.scope, mockElement);
return visitor;
}
@@ -330,13 +321,6 @@ class CollectingTreeElements extends TreeElementMapping {
}
}
-class MockTypeVariablesScope extends TypeVariablesScope {
- @override
- List<DartType> get typeVariables => <DartType>[];
- MockTypeVariablesScope(Scope parent) : super(parent);
- String toString() => 'MockTypeVariablesScope($parent)';
-}
-
// The mock compiler does not split the program in output units.
class MockDeferredLoadTask extends DeferredLoadTask {
MockDeferredLoadTask(Compiler compiler) : super(compiler);
« no previous file with comments | « pkg/compiler/lib/src/tree/nodes.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698