1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed cast

This commit is contained in:
Brian Fiete 2019-12-13 15:28:37 -08:00
parent 1c6c06fa4d
commit 79149d6a7c

View file

@ -8082,6 +8082,8 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
if (ignoreWrites)
return mBfIRBuilder->GetFakeVal();
if (resultFlags != NULL)
*resultFlags = (BfCastResultFlags)(BfCastResultFlags_IsAddr);
typedVal = MakeAddressable(typedVal);
return mBfIRBuilder->CreateBitCast(typedVal.mValue, mBfIRBuilder->MapTypeInstPtr(toTypeInstance));
}