diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-04-27 17:35:58 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-05-17 00:32:47 +0800 |
commit | 0b6eea0c557d0c987baa2d560fe3871ba3bb4a58 (patch) | |
tree | 78cea0e0f073e47f6b9c2eb81f434e463985f68b /libsolidity/ast | |
parent | 970567826905c953134e54c64f129e31b3fc6a05 (diff) | |
download | dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar.gz dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar.bz2 dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar.lz dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar.xz dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar.zst dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.zip |
Bool variables should not allow arithmetic comparison
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 60e3183c..066868c9 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -1358,7 +1358,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(); |