aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/formal
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-05-10 20:30:24 +0800
committerchriseth <c@ethdev.com>2016-05-11 01:40:37 +0800
commit656405240e08e47fce40a2f62af93abc758bd2d2 (patch)
treead1139d8209d5f98b41dee7eb82ebbd2d7d78495 /libsolidity/formal
parentcf226f0607386d1e6d9c75ebc7ce24e733ca4315 (diff)
downloaddexon-solidity-656405240e08e47fce40a2f62af93abc758bd2d2.tar.gz
dexon-solidity-656405240e08e47fce40a2f62af93abc758bd2d2.tar.zst
dexon-solidity-656405240e08e47fce40a2f62af93abc758bd2d2.zip
Simplify interface of RationalNumber.
Diffstat (limited to 'libsolidity/formal')
-rw-r--r--libsolidity/formal/Why3Translator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/formal/Why3Translator.cpp b/libsolidity/formal/Why3Translator.cpp
index 5921b9a4..c794cb24 100644
--- a/libsolidity/formal/Why3Translator.cpp
+++ b/libsolidity/formal/Why3Translator.cpp
@@ -431,7 +431,7 @@ bool Why3Translator::visit(BinaryOperation const& _binaryOperation)
if (commonType.category() == Type::Category::RationalNumber)
{
auto const& constantNumber = dynamic_cast<RationalNumberType const&>(commonType);
- if (constantNumber.denominator() != bigint(1))
+ if (constantNumber.isFractional())
error(_binaryOperation, "Fractional numbers not supported.");
add("(of_int " + toString(commonType.literalValue(nullptr)) + ")");
return false;
@@ -595,7 +595,7 @@ bool Why3Translator::visit(Literal const& _literal)
case Type::Category::RationalNumber:
{
auto const& constantNumber = dynamic_cast<RationalNumberType const&>(*type);
- if (constantNumber.denominator() != 1)
+ if (constantNumber.isFractional())
error(_literal, "Fractional numbers not supported.");
add("(of_int " + toString(type->literalValue(&_literal)) + ")");
break;