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

Merge pull request #2206 from Fusioon/fix-iface-defer

Fix defer on interface methods
This commit is contained in:
Brian Fiete 2025-05-10 09:22:51 +02:00 committed by GitHub
commit 1a1c0daf76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View file

@ -7125,7 +7125,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
if (mDeferCallData != NULL)
{
if (mDeferCallData->mFuncAlloca_Orig == func)
if ((func) && (mDeferCallData->mFuncAlloca_Orig == func))
mModule->AddDeferredCall(BfModuleMethodInstance(methodInstance, mDeferCallData->mFuncAlloca), irArgs, mDeferCallData->mScopeAlloc, mDeferCallData->mRefNode, bypassVirtual, false, true);
else
mModule->AddDeferredCall(BfModuleMethodInstance(methodInstance, func), irArgs, mDeferCallData->mScopeAlloc, mDeferCallData->mRefNode, bypassVirtual);