solidity/test/libsolidity/semanticTests/shifts/shift_cleanup.sol

16 lines
238 B
Solidity
Raw Normal View History

contract C {
function f() public returns (uint16 x) {
2020-09-15 14:16:30 +00:00
unchecked {
x = 0xffff;
x += 32;
x <<= 8;
x >>= 16;
}
}
}
2020-09-15 14:16:30 +00:00
// ====
// compileViaYul: also
// ----
// f() -> 0x0