solidity/test/libsolidity/semanticTests/array/bytes_memory_index_access.sol
2020-03-26 17:47:36 +01:00

14 lines
283 B
Solidity

contract Test {
function set(bytes memory _data, uint256 i)
public
returns (uint256 l, bytes1 c)
{
l = _data.length;
c = _data[i];
}
}
// ====
// compileViaYul: also
// ----
// set(bytes,uint256): 0x40, 0x03, 0x08, "abcdefgh" -> 0x08, "d"