mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +02:00
Fixed valueless case in MakeCallableTarget
This commit is contained in:
parent
65a3bb2196
commit
0e79860ba9
1 changed files with 4 additions and 1 deletions
|
@ -17335,7 +17335,10 @@ BfTypedValue BfExprEvaluator::MakeCallableTarget(BfAstNode* targetSrc, BfTypedVa
|
||||||
else if (target.IsAddr())
|
else if (target.IsAddr())
|
||||||
{
|
{
|
||||||
auto ptrType = mModule->CreatePointerType(primStructType);
|
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()))
|
else if ((primStructType->IsSplattable()) && (target.IsSplat()) && (!IsComptime()))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue