solidity/test/libsolidity/semanticTests/various/byte_optimization_bug.sol

21 lines
362 B
Solidity
Raw Normal View History

contract C {
function f(uint256 x) public returns (uint256 a) {
assembly {
a := byte(x, 31)
}
}
function g(uint256 x) public returns (uint256 a) {
assembly {
a := byte(31, x)
}
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f(uint256): 2 -> 0
// g(uint256): 2 -> 2