Support bitshifting in variables

This commit is contained in:
Alex Beregszaszi
2016-12-12 11:12:10 +01:00
committed by chriseth
parent d0542f0e36
commit b8b4f5e9f9
5 changed files with 346 additions and 9 deletions
+5
View File
@@ -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))