Skip to content

Commit 1dfcb04

Browse files
committed
Fix ReplaceRange usage with single instruction array
Updates the ReplaceRange call to use a single-element array for storeInstruction, ensuring correct replacement of instructions in the method body.
1 parent 6efbe2b commit 1dfcb04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WinRT.Interop.Generator/Factories/InteropMethodRewriteFactory.RetVal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static void RewriteMethod(
8989
_ => new CilInstruction(Stobj, retValType.Import(module).ToTypeDefOrRef()),
9090
};
9191

92-
body.Instructions.ReplaceRange(marker, storeInstruction);
92+
body.Instructions.ReplaceRange(marker, [storeInstruction]);
9393
}
9494
else if (retValType.IsConstructedKeyValuePairType(interopReferences))
9595
{

0 commit comments

Comments
 (0)