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
|
|
|
|
// ----
|
|
|
|
// constructor(): 2 ->
|
2023-08-04 10:27:18 +00:00
|
|
|
// gas irOptimized: 193730
|
2023-05-09 16:22:44 +00:00
|
|
|
// gas legacy: 241606
|
|
|
|
// gas legacyOptimized: 193193
|
2020-04-09 19:59:17 +00:00
|
|
|
// f() -> 2
|