diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-04-30 07:15:22 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-12-12 18:12:10 +0800 |
commit | b8b4f5e9f9a89eac1218551b5da322b41c7813f4 (patch) | |
tree | 6c7b01ba8f1364d866143b3932092520a339b0af /libsolidity/ast | |
parent | d0542f0e369a95ed2ae2a02cec2a199e3844c885 (diff) | |
download | dexon-solidity-b8b4f5e9f9a89eac1218551b5da322b41c7813f4.tar.gz dexon-solidity-b8b4f5e9f9a89eac1218551b5da322b41c7813f4.tar.zst dexon-solidity-b8b4f5e9f9a89eac1218551b5da322b41c7813f4.zip |
Support bitshifting in variables
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index d9660bc0..6b4dd432 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -347,6 +347,11 @@ TypePointer IntegerType::binaryOperatorResult(Token::Value _operator, TypePointe // All integer types can be compared if (Token::isCompareOp(_operator)) return commonType; + // Disable >>> here. + if (_operator == Token::SHR) + return TypePointer(); + if (Token::isShiftOp(_operator) && !isAddress()) // && !_other->isAddress()) + return shared_from_this(); if (Token::isBooleanOp(_operator)) return TypePointer(); if (auto intType = dynamic_pointer_cast<IntegerType const>(commonType)) |