mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
13 lines
313 B
Solidity
13 lines
313 B
Solidity
contract CalldataTest {
|
|
function test(bytes calldata x) public returns (bytes calldata) {
|
|
return x;
|
|
}
|
|
function tester(bytes calldata x) public returns (bytes1) {
|
|
return this.test(x)[2];
|
|
}
|
|
}
|
|
// ====
|
|
// EVMVersion: >=byzantium
|
|
// ----
|
|
// tester(bytes): 0x20, 0x08, "abcdefgh" -> "c"
|