aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-05-10 20:57:29 +0800
committerVoR0220 <catalanor0220@gmail.com>2016-05-11 05:03:33 +0800
commitd4206b7cd0bb0b8a3364c29fe097db035f308388 (patch)
tree267d5df3091710f7a1c3b54ddb8fcac5ab794015 /libsolidity/ast
parent656405240e08e47fce40a2f62af93abc758bd2d2 (diff)
downloaddexon-solidity-d4206b7cd0bb0b8a3364c29fe097db035f308388.tar.gz
dexon-solidity-d4206b7cd0bb0b8a3364c29fe097db035f308388.tar.zst
dexon-solidity-d4206b7cd0bb0b8a3364c29fe097db035f308388.zip
Remove unused tests and add asserts for not implemented parts in code generation.
quick fix on christian's rational change so that ubuntu will stop yelling be more specific with rational declaration for Windows sake rational in namespace correction for windows
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp5
-rw-r--r--libsolidity/ast/Types.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 7995e7e3..0df68d3d 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -32,7 +32,6 @@
using namespace std;
using namespace dev;
using namespace dev::solidity;
-using rational = boost::rational<bigint>;
void StorageOffsets::computeOffsets(TypePointers const& _types)
{
@@ -769,8 +768,8 @@ shared_ptr<FixedPointType const> RationalNumberType::fixedPointType() const
unsigned fractionalBits = 0;
rational value = abs(m_value); // We care about the sign later.
rational maxValue = negative ?
- rational(bigint(1) << 255):
- rational((bigint(1) << 256) - 1);
+ rational(bigint(1) << 255, 1):
+ rational((bigint(1) << 256) - 1, 1);
while (value * 0x100 <= maxValue && value.denominator() != 1 && fractionalBits < 256)
{
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index 26c0f902..0c437316 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -44,7 +44,7 @@ class FunctionType; // forward
using TypePointer = std::shared_ptr<Type const>;
using FunctionTypePointer = std::shared_ptr<FunctionType const>;
using TypePointers = std::vector<TypePointer>;
-using rational = boost::rational<bigint>;
+using rational = boost::rational<dev::bigint>;
enum class DataLocation { Storage, CallData, Memory };
@@ -389,7 +389,7 @@ public:
/// If the integer part does not fit, returns an empty pointer.
std::shared_ptr<FixedPointType const> fixedPointType() const;
- /// @returns true iff the value is not an integer.
+ /// @returns true if the value is not an integer.
bool isFractional() const { return m_value.denominator() != 1; }
private: