1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed opaque ref cast to base type

This commit is contained in:
Brian Fiete 2025-01-26 10:21:18 -08:00
parent 9d533f865f
commit bc0e2b1be2

View file

@ -13419,7 +13419,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
{
if (TypeIsSubTypeOf(fromInner->ToTypeInstance(), toInner->ToTypeInstance()))
{
if (toInner->IsValuelessType())
if (toInner->IsValuelessNonOpaqueType())
return mBfIRBuilder->GetFakeVal();
// Is this valid?
typedVal = MakeAddressable(typedVal);