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 { |