aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 3917dca2..e280b32c 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -411,6 +411,9 @@ public:
/// @returns true if the value is not an integer.
bool isFractional() const { return m_value.denominator() != 1; }
+ /// @returns true if the value is negative.
+ bool isNegative() const { return m_value < 0; }
+
private:
rational m_value;
};