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

12 lines
237 B
Solidity
Raw Normal View History

// This basically tests proper cleanup and conversion. It should not convert x to int8.
contract C {
function f() public returns (int8) {
uint8 x = 254;
int8 y = 1;
return y << x;
}
}
// ----
// f() -> 0