mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Splat fixes
This commit is contained in:
parent
56af3bb376
commit
ab4719422a
2 changed files with 5 additions and 1 deletions
|
@ -9215,7 +9215,9 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
|||
}
|
||||
}
|
||||
|
||||
if ((!target.mType->IsGenericParam()) && (!target.IsSplat()) && (!IsVar(target.mType)))
|
||||
if ((!target.mType->IsGenericParam()) &&
|
||||
((!target.IsSplat()) || (target.mType->IsWrappableType())) &&
|
||||
(!IsVar(target.mType)))
|
||||
target = MakeCallableTarget(targetSrc, target);
|
||||
}
|
||||
|
||||
|
|
|
@ -18124,6 +18124,8 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
|||
{
|
||||
auto thisVal = GetThis();
|
||||
auto fieldPtr = mBfIRBuilder->CreateInBoundsGEP(thisVal.mValue, 0, fieldInstance.mDataIdx);
|
||||
if (mCurTypeInstance->IsUnion())
|
||||
fieldPtr = mBfIRBuilder->CreateBitCast(fieldPtr, mBfIRBuilder->GetPointerTo(mBfIRBuilder->MapType(fieldInstance.mResolvedType)));
|
||||
mBfIRBuilder->CreateAlignedStore(localVal.mValue, fieldPtr, localVar->mResolvedType->mAlign);
|
||||
}
|
||||
MarkFieldInitialized(&fieldInstance);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue