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

Fixed valueless case in MakeCallableTarget

This commit is contained in:
Brian Fiete 2025-03-22 17:10:56 -04:00
parent 65a3bb2196
commit 0e79860ba9

View file

@ -17335,7 +17335,10 @@ BfTypedValue BfExprEvaluator::MakeCallableTarget(BfAstNode* targetSrc, BfTypedVa
else if (target.IsAddr())
{
auto ptrType = mModule->CreatePointerType(primStructType);
target = BfTypedValue(mModule->mBfIRBuilder->CreateBitCast(target.mValue, mModule->mBfIRBuilder->MapType(ptrType)), primStructType, true);
if (primStructType->IsValuelessType())
target = BfTypedValue(target.mValue, primStructType, true);
else
target = BfTypedValue(mModule->mBfIRBuilder->CreateBitCast(target.mValue, mModule->mBfIRBuilder->MapType(ptrType)), primStructType, true);
}
else if ((primStructType->IsSplattable()) && (target.IsSplat()) && (!IsComptime()))
{