aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-08-06 21:33:06 +0800
committerchriseth <c@ethdev.com>2015-08-07 23:50:07 +0800
commitab33328d1f6d9e76d5294bb30785adb86e7175a5 (patch)
treebeb93dfeb1b8f043644a939fd99bce861f37621d /Types.cpp
parent666062cf07ead8166daaf82df2abbaa8d88038d7 (diff)
downloaddexon-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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Types.cpp b/Types.cpp
index 744362fb..3abb0b05 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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();