| Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| index 68e7e4ede814002bff1765b7b000b41cd87e1ece..f256d75a49203c1e140d91b24ed81c03f50dc3dd 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| @@ -1905,7 +1905,10 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
|
|
|
| List<ir.Primitive> arguments = argumentsNode.nodes.mapToList(visit);
|
| // Use default values from the effective target, not the immediate target.
|
| - ConstructorElement target = constructor.effectiveTarget;
|
| + ConstructorElement target = constructor.implementation;
|
| + while (target.isRedirectingFactory && !target.isCyclicRedirection) {
|
| + target = target.effectiveTarget.implementation;
|
| + }
|
|
|
| callStructure = normalizeStaticArguments(callStructure, target, arguments);
|
| TypeMask allocationSiteType;
|
| @@ -1916,10 +1919,11 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
|
| Elements.isConstructorOfTypedArraySubclass(constructor, compiler)) {
|
| allocationSiteType = getAllocationSiteType(send);
|
| }
|
| + ConstructorElement constructorImplementation = constructor.implementation;
|
| return irBuilder.buildConstructorInvocation(
|
| target,
|
| callStructure,
|
| - constructor.computeEffectiveTargetType(type),
|
| + constructorImplementation.computeEffectiveTargetType(type),
|
| arguments,
|
| sourceInformationBuilder.buildNew(node),
|
| allocationSiteType: allocationSiteType);
|
|
|