mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
24 lines
412 B
Solidity
24 lines
412 B
Solidity
contract C {
|
|
uint public i;
|
|
constructor(uint newI) {
|
|
i = newI;
|
|
}
|
|
}
|
|
contract D {
|
|
C c;
|
|
constructor(uint v) {
|
|
c = new C{salt: "abc"}(v);
|
|
}
|
|
function f() public returns (uint r) {
|
|
return c.i();
|
|
}
|
|
}
|
|
// ====
|
|
// EVMVersion: >=constantinople
|
|
// ----
|
|
// constructor(): 2 ->
|
|
// gas irOptimized: 193730
|
|
// gas legacy: 241606
|
|
// gas legacyOptimized: 193193
|
|
// f() -> 2
|