solidity/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol
Matheus Aguiar 562b6ea7a8 Update tests
2023-08-24 15:33:21 -03:00

22 lines
359 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: 193567
// gas legacy: 241234
// gas legacyOptimized: 194257
// f() -> 2