Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cesium.CodeGen/Contexts/Meta/FunctionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ public void VerifySignatureEquality(string name, ParametersInfo? parameters, ITy
var declaredParams = Parameters?.Parameters ?? Array.Empty<ParameterInfo>();
foreach (var (a, b) in actualParams.Zip(declaredParams))
{
if (!a.Type.IsEqualTo(b.Type))
if (!(a.Type.IsEqualTo(b.Type)
|| (a.Type is Ir.Types.PointerType aPtr && b.Type is Ir.Types.PointerType bPtr
&& aPtr.Base is StructType aStruct && bPtr.Base is StructType bStruct
&& aStruct.Identifier == bStruct.Identifier)))
throw new CompilationException(
$"Incorrect type for parameter {a.Name}: declared as {b.Type}, defined as {a.Type}.");
}
Expand Down
Loading