solidity/test/libsolidity/semanticTests/calldata/calldata_bytes_to_storage.sol

10 lines
172 B
Solidity
Raw Normal View History

2020-09-02 07:36:20 +00:00
contract C {
bytes s;
function f(bytes calldata data) external returns (byte) {
s = data;
return s[0];
}
}
// ----
// f(bytes): 0x20, 0x08, "abcdefgh" -> "a"