aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-09-08 07:26:14 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-20 07:03:09 +0800
commit7ac27c957ed061be4f9dafeff686c07cc693d65b (patch)
tree4bf267f9cb85e69b378adb02bf8f52698e866f92 /libsolidity/ast
parent59603f7b8e0fe2847979fe066fb15ecdc911f3e3 (diff)
downloaddexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar.gz
dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.tar.zst
dexon-solidity-7ac27c957ed061be4f9dafeff686c07cc693d65b.zip
Use >> (SAR) to denote constant shifts
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp4
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)