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

17 lines
398 B
Solidity
Raw Normal View History

pragma experimental ABIEncoderV2;
contract C {
2020-05-11 22:06:25 +00:00
function f(int16 a, uint16 b) public returns (int16) {
return a >> b;
}
}
2020-04-20 21:16:42 +00:00
// ====
// compileViaYul: also
// ----
2020-05-11 22:06:25 +00:00
// f(int16,uint16): 0xff99, 0x00 -> FAILURE
// f(int16,uint16): 0xff99, 0x01 -> FAILURE
// f(int16,uint16): 0xff99, 0x02 -> FAILURE
// f(int16,uint16): 0xff99, 0x04 -> FAILURE
// f(int16,uint16): 0xff99, 0x08 -> FAILURE