2020-04-09 19:59:17 +00:00
|
|
|
contract C {
|
|
|
|
uint public i;
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor(uint newI) {
|
2020-04-09 19:59:17 +00:00
|
|
|
i = newI;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
contract D {
|
|
|
|
C c;
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor(uint v) {
|
2020-04-09 19:59:17 +00:00
|
|
|
c = new C{salt: "abc"}(v);
|
|
|
|
}
|
|
|
|
function f() public returns (uint r) {
|
|
|
|
return c.i();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// EVMVersion: >=constantinople
|
|
|
|
// compileViaYul: also
|
|
|
|
// ----
|
|
|
|
// constructor(): 2 ->
|
2021-11-15 15:19:33 +00:00
|
|
|
// gas irOptimized: 200458
|
|
|
|
// gas legacy: 246202
|
|
|
|
// gas legacyOptimized: 195914
|
2020-04-09 19:59:17 +00:00
|
|
|
// f() -> 2
|