mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Struct cast fix, deferred block fix
This commit is contained in:
parent
2fb4b14e50
commit
8b17718fed
8 changed files with 82 additions and 18 deletions
|
@ -8079,6 +8079,11 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
|||
{
|
||||
if (toType->IsValuelessType())
|
||||
return BfIRValue::sValueless;
|
||||
if (ignoreWrites)
|
||||
return mBfIRBuilder->GetFakeVal();
|
||||
|
||||
typedVal = MakeAddressable(typedVal);
|
||||
return mBfIRBuilder->CreateBitCast(typedVal.mValue, mBfIRBuilder->MapTypeInstPtr(toTypeInstance));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue