[dart2wasm] Fix minor bug with redirecting initializers.

Change-Id: I747ad702d2189b7c113e9202f77ad19a4b72c14a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250580
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This commit is contained in:
Joshua Litt 2022-07-22 17:57:27 +00:00 committed by Commit Bot
parent 8d1ad7d13c
commit 5e733dec66

View file

@ -492,7 +492,8 @@ class CodeGenerator extends ExpressionVisitor1<w.ValueType, w.ValueType>
types.makeType(
this, TypeParameterType(typeParam, Nullability.nonNullable));
}
_visitArguments(node.arguments, node.targetReference, 1);
_visitArguments(
node.arguments, node.targetReference, 1 + cls.typeParameters.length);
call(node.targetReference);
}