solidity/test/libsolidity/semanticTests/operators/shifts/shift_left.sol

17 lines
512 B
Solidity
Raw Normal View History

contract C {
function f(uint256 a, uint256 b) public returns (uint256) {
return a << b;
}
}
2020-04-20 21:16:42 +00:00
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f(uint256,uint256): 0x4266, 0x0 -> 0x4266
// f(uint256,uint256): 0x4266, 0x8 -> 0x426600
// f(uint256,uint256): 0x4266, 0x10 -> 0x42660000
// f(uint256,uint256): 0x4266, 0x11 -> 0x84cc0000
// f(uint256,uint256): 0x4266, 0xf0 -> 0x4266000000000000000000000000000000000000000000000000000000000000
// f(uint256,uint256): 0x4266, 0x100 -> 0