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

16 lines
312 B
Solidity
Raw Normal View History

contract C {
function f(int256 a, int256 b) public returns (int256) {
return a << b;
}
function g(int256 a, int256 b) public returns (int256) {
return a >> b;
}
}
2020-04-20 21:16:42 +00:00
// ====
// compileViaYul: also
// ----
// f(int256,int256): 1, -1 -> FAILURE
// g(int256,int256): 1, -1 -> FAILURE