solidity/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol
2022-05-19 20:23:28 +02:00

23 lines
367 B
Solidity

contract C {
uint public i;
constructor(uint newI) {
i = newI;
}
}
contract D {
C c;
constructor(uint v) {
c = new C(v);
}
function f() public returns (uint r) {
return c.i();
}
}
// ====
// ----
// constructor(): 2 ->
// gas irOptimized: 200217
// gas legacy: 245842
// gas legacyOptimized: 195676
// f() -> 2