Index: dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
=================================================================== |
--- dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart (revision 31731) |
+++ dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart (working copy) |
@@ -645,8 +645,7 @@ |
InterfaceType factoryType = |
treeElements.getType(redirectionNode.expression); |
- targetType = targetType.subst(factoryType.typeArguments, |
- factoryType.element.typeVariables); |
+ targetType = targetType.substByContext(factoryType); |
factory.redirectionTarget = target; |
factory.redirectionTargetType = targetType; |
} |
@@ -2738,7 +2737,7 @@ |
} else if (target.modifiers.isFinal() || |
target.modifiers.isConst() || |
(target.isFunction() && |
- Elements.isStaticOrTopLevelFunction(target) && |
+ Elements.isStaticOrTopLevelFunction(target) && |
!target.isSetter())) { |
if (target.isFunction()) { |
setter = warnAndCreateErroneousElement( |
@@ -4166,17 +4165,14 @@ |
*/ |
void addAllSupertypes(OrderedTypeSetBuilder allSupertypes, |
InterfaceType type) { |
- Link<DartType> typeArguments = type.typeArguments; |
ClassElement classElement = type.element; |
- Link<DartType> typeVariables = classElement.typeVariables; |
Link<DartType> supertypes = classElement.allSupertypes; |
assert(invariant(element, supertypes != null, |
message: "Supertypes not computed on $classElement " |
"during resolution of $element")); |
while (!supertypes.isEmpty) { |
DartType supertype = supertypes.head; |
- allSupertypes.add(compiler, |
- supertype.subst(typeArguments, typeVariables)); |
+ allSupertypes.add(compiler, supertype.substByContext(type)); |
supertypes = supertypes.tail; |
} |
} |