Bool variables should not allow arithmetic comparison

This commit is contained in:
Leonardo Alt
2018-04-27 11:35:58 +02:00
parent ef2111a2fe
commit ab251c7e7d
3 changed files with 2 additions and 35 deletions
+1 -1
View File
@@ -1374,7 +1374,7 @@ TypePointer BoolType::binaryOperatorResult(Token::Value _operator, TypePointer c
{
if (category() != _other->category())
return TypePointer();
if (Token::isCompareOp(_operator) || _operator == Token::And || _operator == Token::Or)
if (_operator == Token::Equal || _operator == Token::NotEqual || _operator == Token::And || _operator == Token::Or)
return _other;
else
return TypePointer();