solidity/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol
2020-07-07 12:16:18 +02:00

22 lines
355 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
// compileViaYul: also
// ----
// constructor(): 2 ->
// f() -> 2