aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-04-27 17:35:58 +0800
committerLeonardo Alt <leo@ethereum.org>2018-04-27 17:35:58 +0800
commitab251c7e7d18a03184ab11e2d1c99d05af7d97f9 (patch)
treee9e9752d4163fe85dbdf6ff6ebb10d8b8e8eb187 /libsolidity/ast
parentef2111a2fe89fef06a4d8e750d6a652b16358f4b (diff)
downloaddexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar.gz
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar.zst
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.zip
Bool variables should not allow arithmetic comparison
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 425e5045..a8d9a1d3 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -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();