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 c382e4e5f5947a316889bf6fe1d1a12e7608acd0..f453074e3fa83a82afe83fc4b85e8369a13a2ce1 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 |
@@ -291,6 +291,7 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive> |
assert(constructor.isGenerativeConstructor); |
assert(constructor.isImplementation); |
if (constructor.isSynthesized) return null; |
+ ResolvedAst resolvedAst = backend.frontend.getResolvedAst(constructor); |
ast.FunctionExpression node = constructor.node; |
// If we know the body doesn't have any code, we don't generate it. |
if (!node.hasBody) return null; |
@@ -306,14 +307,14 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive> |
} |
}); |
if (bodyElement == null) { |
- bodyElement = new ConstructorBodyElementX(constructor); |
+ bodyElement = new ConstructorBodyElementX(resolvedAst, constructor); |
classElement.addBackendMember(bodyElement); |
if (constructor.isPatch) { |
// Create origin body element for patched constructors. |
ConstructorBodyElementX patch = bodyElement; |
ConstructorBodyElementX origin = |
- new ConstructorBodyElementX(constructor.origin); |
+ new ConstructorBodyElementX(resolvedAst, constructor.origin); |
origin.applyPatch(patch); |
classElement.origin.addBackendMember(bodyElement.origin); |
} |