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

Fixed const bool value for 'the result of this operation is always false'

This commit is contained in:
Brian Fiete 2022-01-08 22:06:18 -05:00
parent 5c42ea6d2d
commit 9fc6ae9f05

View file

@ -21251,7 +21251,7 @@ bool BfExprEvaluator::CheckConstCompare(BfBinaryOp binaryOp, BfAstNode* opToken,
if (constResult == 0)
{
mModule->Warn(0, "The result of this operation is always 'false'", opToken);
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 1), mModule->GetPrimitiveType(BfTypeCode_Boolean));
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 0), mModule->GetPrimitiveType(BfTypeCode_Boolean));
return true;
}
else if (constResult == 1)