瀏覽代碼

Opaque calling issue

Brian Fiete 7 月之前
父節點
當前提交
5000a8a824
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1 1
      IDEHelper/Compiler/BfModule.cpp
  2. 4 0
      IDEHelper/Tests/src/Opaques.bf

+ 1 - 1
IDEHelper/Compiler/BfModule.cpp

@@ -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++;
 			}
 			}

+ 4 - 0
IDEHelper/Tests/src/Opaques.bf

@@ -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);
 	}
 	}
 }
 }