1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

ByVal fixes

This commit is contained in:
Brian Fiete 2021-09-16 07:56:55 -07:00
parent 9158002a42
commit 0dc45cb712
4 changed files with 7 additions and 5 deletions

View file

@ -5846,7 +5846,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
mModule->mBfIRBuilder->Call_AddAttribute(callInst, argIdx + 1, BfIRAttribute_NoCapture);
addDeref = paramType->mSize;
}
else if ((methodInstance->WantsStructsAttribByVal()) && (!paramType->IsSizedArray()))
else if (methodInstance->WantsStructsAttribByVal(paramType))
{
mModule->mBfIRBuilder->Call_AddAttribute(callInst, argIdx + 1, BfIRAttribute_ByVal, mModule->mSystem->mPtrSize);
}