Revert "BREAKING: Bool variables should not allow arithmetic comparison"

This commit is contained in:
chriseth
2018-05-02 15:56:59 +02:00
committed by GitHub
parent 42289b642f
commit 8debded743
5 changed files with 35 additions and 60 deletions
+1 -1
View File
@@ -1359,7 +1359,7 @@ TypePointer BoolType::binaryOperatorResult(Token::Value _operator, TypePointer c
{
if (category() != _other->category())
return TypePointer();
if (_operator == Token::Equal || _operator == Token::NotEqual || _operator == Token::And || _operator == Token::Or)
if (Token::isCompareOp(_operator) || _operator == Token::And || _operator == Token::Or)
return _other;
else
return TypePointer();