diff options
author | chriseth <c@ethdev.com> | 2015-08-06 21:33:06 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-08-07 23:50:07 +0800 |
commit | ab33328d1f6d9e76d5294bb30785adb86e7175a5 (patch) | |
tree | beb93dfeb1b8f043644a939fd99bce861f37621d /Types.cpp | |
parent | 666062cf07ead8166daaf82df2abbaa8d88038d7 (diff) | |
download | dexon-solidity-ab33328d1f6d9e76d5294bb30785adb86e7175a5.tar.gz dexon-solidity-ab33328d1f6d9e76d5294bb30785adb86e7175a5.tar.zst dexon-solidity-ab33328d1f6d9e76d5294bb30785adb86e7175a5.zip |
Do not allow boolean operators for integers.
Fixes #2496
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -311,6 +311,8 @@ TypePointer IntegerType::binaryOperatorResult(Token::Value _operator, TypePointe // All integer types can be compared if (Token::isCompareOp(_operator)) return commonType; + if (Token::isBooleanOp(_operator)) + return TypePointer(); // Nothing else can be done with addresses if (commonType->isAddress()) return TypePointer(); |