diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-04-09 21:22:45 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-04-12 03:17:10 +0800 |
commit | daa69df447e167fe75d57a5bbbabee4d637218a4 (patch) | |
tree | 06651c92bf79cbc14a931d28fc161ad480997506 /libsolidity/ast | |
parent | 418e2725b50aebc169dd80f78a0ce3eefc2e296e (diff) | |
download | dexon-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.h | 3 |
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; |