mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed boxing of generic const value constraint
This commit is contained in:
parent
edd7005c62
commit
68e711beff
1 changed files with 1 additions and 1 deletions
|
@ -9996,7 +9996,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
||||||
// Generic param -> *
|
// Generic param -> *
|
||||||
if ((typedVal.mType->IsGenericParam()) && (!toType->IsGenericParam()))
|
if ((typedVal.mType->IsGenericParam()) && (!toType->IsGenericParam()))
|
||||||
{
|
{
|
||||||
if (toType == mContext->mBfObjectType)
|
if ((typedVal.mKind != Beefy::BfTypedValueKind_GenericConstValue) && (toType == mContext->mBfObjectType))
|
||||||
{
|
{
|
||||||
// Always allow casting from generic to object
|
// Always allow casting from generic to object
|
||||||
return typedVal.mValue;
|
return typedVal.mValue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue