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

16 lines
304 B
Solidity
Raw Normal View History

2020-05-11 22:06:25 +00:00
contract C {
function f(int256 a, uint256 b) public returns (int256) {
return a << b;
}
function g(int256 a, uint256 b) public returns (int256) {
return a >> b;
}
}
// ====
// compileViaYul: also
// ----
// f(int256,uint256): 1, -1 -> 0
// g(int256,uint256): 1, -1 -> 0