solidity/test/libsolidity/syntaxTests/shifts/shift_singed_rvalue.sol

12 lines
381 B
Solidity
Raw Normal View History

2020-05-11 22:06:25 +00:00
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 >> (256 - b);
}
}
// ----
2020-06-22 16:43:57 +00:00
// TypeError 2271: (89-95): Operator >> not compatible with types int256 and int256
// TypeError 2271: (179-193): Operator >> not compatible with types int256 and int256