aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-04-09 21:22:45 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-04-12 03:17:10 +0800
commitdaa69df447e167fe75d57a5bbbabee4d637218a4 (patch)
tree06651c92bf79cbc14a931d28fc161ad480997506 /libsolidity/ast
parent418e2725b50aebc169dd80f78a0ce3eefc2e296e (diff)
downloaddexon-solidity-daa69df447e167fe75d57a5bbbabee4d637218a4.tar.gz
dexon-solidity-daa69df447e167fe75d57a5bbbabee4d637218a4.tar.zst
dexon-solidity-daa69df447e167fe75d57a5bbbabee4d637218a4.zip
Error on invalid arithmetic with constant expressions.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index 05f506f1..ecfc2333 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -446,6 +446,9 @@ public:
/// @returns true if the value is negative.
bool isNegative() const { return m_value < 0; }
+ /// @returns true if the value is zero.
+ bool isZero() const { return m_value == 0; }
+
private:
rational m_value;