1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-13 22:04:09 +02:00

Opaque calling issue

This commit is contained in:
Brian Fiete 2025-02-15 12:58:23 -08:00
parent ab93fb83a4
commit 5000a8a824
2 changed files with 5 additions and 1 deletions

View file

@ -21983,7 +21983,7 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
if ((methodDef->mIsMutating) || (methodInstance->mCallingConvention == BfCallingConvention_Cdecl)) if ((methodDef->mIsMutating) || (methodInstance->mCallingConvention == BfCallingConvention_Cdecl))
argIdx++; argIdx++;
} }
else if (!paramVar->mResolvedType->IsValuelessType()) else if (!paramVar->mResolvedType->IsValuelessNonOpaqueType())
{ {
argIdx++; argIdx++;
} }

View file

@ -20,6 +20,8 @@ class Opaques
saPtr.mB += addB; saPtr.mB += addB;
} }
static int Method1(StructB sb, void* ptr) => 0;
[Test] [Test]
public static void TestBasics() public static void TestBasics()
{ {
@ -28,5 +30,7 @@ class Opaques
sb.Modify(1000, 2000); sb.Modify(1000, 2000);
Test.Assert(sa.mA == 1123); Test.Assert(sa.mA == 1123);
Test.Assert(sa.mB == 2234); Test.Assert(sa.mB == 2234);
Method1(default, default);
} }
} }