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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1150523003: dart2js cps: Fix default values for forwarding constructors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 759ed6c13fe8e99f0c7880fe199ac8b2424eff44..0c559d9f0515ed75271ccc83f8d66226a61453a1 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
@@ -3637,10 +3637,11 @@ class JsIrBuilderVisitor extends IrBuilderVisitor {
_) {
List<ir.Primitive> arguments =
node.send.arguments.mapToList(visit, growable:false);
- arguments = normalizeStaticArguments(
- callStructure, constructor, arguments);
+ // Use default values from the effective target, not the immediate target.
+ ConstructorElement target = constructor.effectiveTarget;
+ arguments = normalizeStaticArguments(callStructure, target, arguments);
return irBuilder.buildConstructorInvocation(
- constructor.effectiveTarget,
+ target,
callStructure,
constructor.computeEffectiveTargetType(type),
arguments);
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698