mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 05:44:11 +02:00
Fixed typed primitive addr cast
This commit is contained in:
parent
0cf9135b8a
commit
a24800a5a3
1 changed files with 1 additions and 0 deletions
|
@ -13778,6 +13778,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
||||||
// Handle the typedPrim<->underlying part implicitly
|
// Handle the typedPrim<->underlying part implicitly
|
||||||
if (fromType->IsTypedPrimitive())
|
if (fromType->IsTypedPrimitive())
|
||||||
{
|
{
|
||||||
|
typedVal = LoadValue(typedVal);
|
||||||
auto convTypedValue = BfTypedValue(typedVal.mValue, fromType->GetUnderlyingType());
|
auto convTypedValue = BfTypedValue(typedVal.mValue, fromType->GetUnderlyingType());
|
||||||
return CastToValue(srcNode, convTypedValue, toType, (BfCastFlags)(castFlags & ~BfCastFlags_Explicit), NULL);
|
return CastToValue(srcNode, convTypedValue, toType, (BfCastFlags)(castFlags & ~BfCastFlags_Explicit), NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue