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

Fixed typed primitive addr cast

This commit is contained in:
Brian Fiete 2022-06-14 07:30:13 -07:00
parent 0cf9135b8a
commit a24800a5a3

View file

@ -13778,6 +13778,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
// Handle the typedPrim<->underlying part implicitly
if (fromType->IsTypedPrimitive())
{
typedVal = LoadValue(typedVal);
auto convTypedValue = BfTypedValue(typedVal.mValue, fromType->GetUnderlyingType());
return CastToValue(srcNode, convTypedValue, toType, (BfCastFlags)(castFlags & ~BfCastFlags_Explicit), NULL);
}