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

Fix static payload enum switch isConst

This commit is contained in:
Fusioon 2025-03-12 05:11:37 +01:00
parent 9c79d8aa6c
commit 246c408c72

View file

@ -4678,7 +4678,7 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
BfPrimitiveType* intCoercibleType = GetIntCoercibleType(switchValue.mType);
bool isConstSwitch = false;
if ((switchValue.mValue.IsConst()) || (switchValue.mType->IsValuelessType()))
if ((mBfIRBuilder->IsConstValue(switchValue.mValue)) || (switchValue.mType->IsValuelessType()))
{
isConstSwitch = true;
}