Skip to content

Commit be5eefc

Browse files
Make InlineArrayTransform post-order
1 parent dda9886 commit be5eefc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,6 @@ void VisitLogicNot(Comp inst, ILInstruction arg)
277277

278278
protected internal override void VisitCall(Call inst)
279279
{
280-
if (context.Settings.InlineArrays && InlineArrayTransform.RunOnExpression(inst, context))
281-
{
282-
return;
283-
}
284-
285280
if (NullableLiftingTransform.MatchGetValueOrDefault(inst, out var nullableValue, out var fallback)
286281
&& SemanticHelper.IsPure(fallback.Flags))
287282
{
@@ -298,9 +293,14 @@ protected internal override void VisitCall(Call inst)
298293
{
299294
context.Step("TransformRuntimeHelpersCreateSpanInitialization: single-dim", inst);
300295
inst.ReplaceWith(replacement2);
296+
replacement2.AcceptVisitor(this);
301297
return;
302298
}
303299
base.VisitCall(inst);
300+
if (context.Settings.InlineArrays && InlineArrayTransform.RunOnExpression(inst, context))
301+
{
302+
return;
303+
}
304304
TransformAssignment.HandleCompoundAssign(inst, context);
305305
}
306306

0 commit comments

Comments
 (0)