mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
12 lines
407 B
Solidity
12 lines
407 B
Solidity
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);
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError 2271: (89-95='a >> b'): Operator >> not compatible with types int256 and int256
|
|
// TypeError 2271: (179-193='a >> (256 - b)'): Operator >> not compatible with types int256 and int256
|