| Index: sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| index ff499fc4548274054087a5d8e703feb0980490af..5dd026aa6ed882f957bd4466555d31f034784265 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| @@ -1334,19 +1334,10 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| if (Elements.isUnresolved(constructor)) return types.dynamicType;
|
| DartType constructorType = constructor.computeType(compiler);
|
| if (identical(type.kind, TypeKind.INTERFACE)) {
|
| - if (constructor.isSynthesized) {
|
| - // TODO(johnniwinther): Remove this when synthesized constructors handle
|
| - // type variables correctly.
|
| - InterfaceType interfaceType = type;
|
| - ClassElement receiverElement = interfaceType.element;
|
| - while (receiverElement.isMixinApplication) {
|
| - receiverElement = receiverElement.supertype.element;
|
| - }
|
| - constructorType = constructorType.substByContext(
|
| - interfaceType.asInstanceOf(receiverElement));
|
| - } else {
|
| - constructorType = constructorType.substByContext(type);
|
| - }
|
| + InterfaceType interfaceType = type;
|
| + constructorType = constructorType.subst(
|
| + interfaceType.typeArguments,
|
| + interfaceType.element.typeVariables);
|
| }
|
| return constructorType;
|
| }
|
|
|