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

Fixed generic const bool specification

This commit is contained in:
Brian Fiete 2022-04-16 07:30:55 -07:00
parent 946a72d21d
commit e30ca6efb9

View file

@ -12873,7 +12873,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
BfConstExprValueType* toConstExprValueType = (BfConstExprValueType*)toType;
auto variantVal = TypedValueToVariant(srcNode, typedVal);
if ((mBfIRBuilder->IsInt(variantVal.mTypeCode)) && (mBfIRBuilder->IsInt(toConstExprValueType->mValue.mTypeCode)))
if ((mBfIRBuilder->IsIntable(variantVal.mTypeCode)) && (mBfIRBuilder->IsIntable(toConstExprValueType->mValue.mTypeCode)))
{
if (variantVal.mInt64 == toConstExprValueType->mValue.mInt64)
return typedVal.mValue;