Index: pkg/compiler/lib/src/kernel/kernel_visitor.dart |
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart |
index ae845896c21c6d2362d4acd7640a0027150010dc..77a5161cf39f6d2c71137df112fa80d06011b790 100644 |
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart |
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart |
@@ -1145,8 +1145,13 @@ class KernelVisitor extends Object |
ir.Expression buildConstructorInvoke(NewExpression node, {bool isConst}) { |
ConstructorElement constructor = elements[node.send]; |
- ConstructorTarget target = |
- kernel.computeEffectiveTarget(constructor, elements.getType(node)); |
+ ConstructorTarget target; |
+ if (isConst) { |
+ target = |
+ kernel.computeEffectiveTarget(constructor, elements.getType(node)); |
+ } else { |
+ target = new ConstructorTarget(constructor, elements.getType(node)); |
+ } |
NodeList arguments = node.send.argumentsNode; |
if (kernel.isSyntheticError(target.element)) { |
return new ir.MethodInvocation(new ir.InvalidExpression(), |