solidity/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_empty_string_v2.sol

17 lines
368 B
Solidity
Raw Normal View History

// Tests that this will not end up using a "bytes0" type
// (which would assert)
2020-11-23 18:06:44 +00:00
pragma abicoder v2;
contract C {
function f() public pure returns (bytes memory, bytes memory) {
return (abi.encode(""), abi.encodePacked(""));
}
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f() -> 0x40, 0xa0, 0x40, 0x20, 0x0, 0x0