aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/ast/Types.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 6234a04d..52d61d13 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -582,7 +582,12 @@ tuple<bool, rational> RationalNumberType::isValidLiteral(Literal const& _literal
expPoint = find(_literal.value().begin(), _literal.value().end(), 'E');
auto radixPoint = find(_literal.value().begin(), _literal.value().end(), '.');
- if (!boost::starts_with(_literal.value(), "0x") && (expPoint != _literal.value().end()))
+ if (boost::starts_with(_literal.value(), "0x"))
+ {
+ // process as hex
+ x = bigint(_literal.value());
+ }
+ else if (expPoint != _literal.value().end())
{
if (
!all_of(_literal.value().begin(), expPoint, ::isdigit)