Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2361783002: Handle calls to redirecting factories. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698