1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Merge pull request #2185 from Fusioon/fix-static-enum-switch

Fix static payload enum switch isConst
This commit is contained in:
Brian Fiete 2025-03-13 06:35:38 -04:00 committed by GitHub
commit cbfc091fce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;
}