mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
44da8507b1
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
19 lines
452 B
Solidity
19 lines
452 B
Solidity
pragma abicoder v2;
|
|
contract C {
|
|
bytes[] a;
|
|
|
|
function f() public {
|
|
a.push("abc");
|
|
a.push("abcdefghabcdefghabcdefghabcdefgh");
|
|
a.push("abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh");
|
|
assert(a[0][0] == "a");
|
|
assert(a[1][31] == "h");
|
|
assert(a[2][32] == "a");
|
|
}
|
|
}
|
|
// ----
|
|
// f() ->
|
|
// gas irOptimized: 179165
|
|
// gas legacy: 181014
|
|
// gas legacyOptimized: 180413
|