2020-12-14 17:34:40 +00:00
|
|
|
pragma abicoder v2;
|
2020-11-03 09:55:01 +00:00
|
|
|
|
|
|
|
contract C {
|
|
|
|
function f(uint a, bytes memory b, uint c)
|
2020-12-14 17:34:40 +00:00
|
|
|
public pure returns (uint, uint, bytes1, uint) {
|
2020-11-03 09:55:01 +00:00
|
|
|
return (a, b.length, b[3], c);
|
|
|
|
}
|
|
|
|
|
|
|
|
function f_external(uint a, bytes calldata b, uint c)
|
2020-12-14 17:34:40 +00:00
|
|
|
external pure returns (uint, uint, bytes1, uint) {
|
2020-11-03 09:55:01 +00:00
|
|
|
return (a, b.length, b[3], c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
|
|
|
// ----
|
|
|
|
// f(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9
|
|
|
|
// f_external(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9
|