Chromium Code Reviews| 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 e768e3c154fb4a360fa86d4107f252acbaad1b38..f0c02234133b3e0407f9e0b0acd78d1aeac6da39 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 |
| @@ -192,8 +192,15 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive> |
| ir.FunctionDefinition _makeFunctionBody(FunctionElement element, |
| ast.FunctionExpression node) { |
| FunctionSignature signature = element.functionSignature; |
| - List<ParameterElement> parameters = []; |
| - signature.orderedForEachParameter(parameters.add); |
| + List<Local> parameters = []; |
|
karlklose
2015/06/10 12:55:22
Add type argument.
asgerf
2015/06/10 13:01:17
Done.
|
| + signature.orderedForEachParameter((e) => parameters.add(e)); |
|
karlklose
2015/06/10 12:55:22
Is this because of type warnings?
asgerf
2015/06/10 13:01:17
Yup. :(
|
| + |
| + if (element.isFactoryConstructor) { |
| + // Type arguments are passed in as extra parameters. |
| + for (DartType typeVariable in element.enclosingClass.typeVariables) { |
| + parameters.add(new TypeVariableLocal(typeVariable, element)); |
| + } |
| + } |
| irBuilder.buildFunctionHeader(parameters, |
| closureScope: getClosureScopeForNode(node), |