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

Unified Diff: pkg/compiler/lib/src/resolution/type_resolver.dart

Issue 1172693003: Move computeType to TypedElement and TypeDeclarationElement. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/resolution/resolution_common.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/type_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/type_resolver.dart b/pkg/compiler/lib/src/resolution/type_resolver.dart
index 85c21712785ba763339089eff4f8a7a2573fc606..513bc3c2b2d9ded0b39ecab424569da6624f0c7e 100644
--- a/pkg/compiler/lib/src/resolution/type_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/type_resolver.dart
@@ -140,7 +140,7 @@ class TypeResolver {
// TODO(johnniwinther): [_ensureClassWillBeResolved] should imply
// [computeType].
compiler.resolver._ensureClassWillBeResolved(cls);
- element.computeType(compiler);
+ cls.computeType(compiler);
List<DartType> arguments = <DartType>[];
bool hasTypeArgumentMismatch = resolveTypeArguments(
visitor, node, cls.typeVariables, arguments);
@@ -160,7 +160,7 @@ class TypeResolver {
TypedefElement typdef = element;
// TODO(johnniwinther): [ensureResolved] should imply [computeType].
typdef.ensureResolved(compiler);
- element.computeType(compiler);
+ typdef.computeType(compiler);
List<DartType> arguments = <DartType>[];
bool hasTypeArgumentMismatch = resolveTypeArguments(
visitor, node, typdef.typeVariables, arguments);
@@ -176,6 +176,7 @@ class TypeResolver {
}
}
} else if (element.isTypeVariable) {
+ TypeVariableElement typeVariable = element;
Element outer =
visitor.enclosingElement.outermostEnclosingMemberOrTopLevel;
bool isInFactoryConstructor =
@@ -187,9 +188,9 @@ class TypeResolver {
type = reportFailureAndCreateType(
MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
{'typeVariableName': node},
- userProvidedBadType: element.computeType(compiler));
+ userProvidedBadType: typeVariable.type);
} else {
- type = element.computeType(compiler);
+ type = typeVariable.type;
}
type = checkNoTypeArguments(type);
} else {
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution_common.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698