solidity/test/libsolidity/semanticTests/errors/small_error_optimization.sol
2023-05-09 17:28:07 +02:00

20 lines
311 B
Solidity

error E();
contract A {
uint8[] x;
function f() public {
for (uint i = 0; i < 100; ++i)
x.push(uint8(i));
revert E();
}
}
contract B {
function f() public {
(new A()).f();
}
}
// ----
// f() -> FAILURE, hex"92bbf6e8"
// gas irOptimized: 274265
// gas legacy: 310592
// gas legacyOptimized: 273662