diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-09-08 07:26:14 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-20 07:03:09 +0800 |
commit | 7ac27c957ed061be4f9dafeff686c07cc693d65b (patch) | |
tree | 4bf267f9cb85e69b378adb02bf8f52698e866f92 | |
parent | 59603f7b8e0fe2847979fe066fb15ecdc911f3e3 (diff) | |
download | dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar.gz dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar.bz2 dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar.lz dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar.xz dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar.zst dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.zip |
Use >> (SAR) to denote constant shifts
-rw-r--r-- | libsolidity/ast/Types.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 3f13d62d..eb98047c 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -718,7 +718,9 @@ TypePointer RationalNumberType::binaryOperatorResult(Token::Value _operator, Typ value = m_value.numerator() * pow(bigint(2), exponent); break; } - case Token::SHR: + // NOTE: we're using >> (SAR) to denote right shifting. The type of the LValue + // determines the resulting type and the type of shift (SAR or SHR). + case Token::SAR: { using boost::multiprecision::pow; if (fractional) |