solidity/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_decode_simple.sol

13 lines
298 B
Solidity
Raw Normal View History

contract C {
function f() public pure returns (uint256, bytes memory) {
bytes memory arg = "abcdefg";
return abi.decode(abi.encode(uint256(33), arg), (uint256, bytes));
}
}
2020-05-25 11:40:43 +00:00
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x21, 0x40, 0x7, "abcdefg"