Skip to content

Commit 35d2507

Browse files
committed
Fix invalid constructor being generated in unboxed struct variants
1 parent de2c125 commit 35d2507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Il2CppInterop.Generator/Passes/Pass50GenerateMethods.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public static void DoPass(RewriteGlobalContext context)
6666
if (nextInstruction != null)
6767
bodyBuilder.Append(nextInstruction);
6868

69-
if (typeContext.ComputedTypeSpecifics != TypeRewriteContext.TypeSpecifics.BlittableStruct)
69+
if (typeContext.ComputedTypeSpecifics != TypeRewriteContext.TypeSpecifics.BlittableStruct &&
70+
typeContext.ComputedTypeSpecifics != TypeRewriteContext.TypeSpecifics.GenericBlittableStruct)
7071
{
7172
if (originalMethod.IsConstructor)
7273
{

0 commit comments

Comments
 (0)