Ver Fonte

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

Fix static payload enum switch isConst
Brian Fiete há 6 meses atrás
pai
commit
cbfc091fce
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      IDEHelper/Compiler/BfStmtEvaluator.cpp

+ 1 - 1
IDEHelper/Compiler/BfStmtEvaluator.cpp

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