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

Warn on 'this Foo*', make [CRepr] always pass 'this' as address

This commit is contained in:
Brian Fiete 2025-03-05 14:51:46 -08:00
parent 176947189b
commit 445fc0e982
5 changed files with 93 additions and 11 deletions

View file

@ -7698,7 +7698,7 @@ void BfExprEvaluator::PushThis(BfAstNode* targetSrc, BfTypedValue argVal, BfMeth
else
allowThisSplatting = methodInstance->AllowsSplatting(-1);
if ((!allowThisSplatting) || (methodDef->mIsMutating) || (methodInstance->mCallingConvention == BfCallingConvention_Cdecl))
if ((!allowThisSplatting) || (methodDef->mIsMutating) || (methodInstance->ForcingThisPtr()))
{
argVal = mModule->MakeAddressable(argVal);
irArgs.push_back(argVal.mValue);