1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed fakeval function binding case

This commit is contained in:
Brian Fiete 2025-05-11 06:39:59 +02:00
parent e088ce1365
commit 6d45dabb1d

View file

@ -13415,6 +13415,8 @@ BfIRValue BfModule::CastToFunction(BfAstNode* srcNode, const BfTypedValue& targe
} }
if ((mCompiler->mOptions.mAllowHotSwapping) && (!mIsComptimeModule)) if ((mCompiler->mOptions.mAllowHotSwapping) && (!mIsComptimeModule))
bindFuncVal = mBfIRBuilder->RemapBindFunction(bindFuncVal); bindFuncVal = mBfIRBuilder->RemapBindFunction(bindFuncVal);
if ((bindFuncVal.IsFake()) && (!mBfIRBuilder->mIgnoreWrites))
return GetDefaultValue(GetPrimitiveType(BfTypeCode_IntPtr));
return mBfIRBuilder->CreatePtrToInt(bindFuncVal, BfTypeCode_IntPtr); return mBfIRBuilder->CreatePtrToInt(bindFuncVal, BfTypeCode_IntPtr);
} }