2019-04-24 11:18:13 +00:00
|
|
|
contract Base {
|
|
|
|
uint public x;
|
|
|
|
uint public y;
|
|
|
|
function init(uint a, uint b) public {
|
|
|
|
x = a;
|
|
|
|
y = b;
|
|
|
|
}
|
|
|
|
function init(uint a) public {
|
|
|
|
x = a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contract Child is Base {
|
|
|
|
function cInit(uint c) public {
|
|
|
|
Base.init(c);
|
|
|
|
}
|
|
|
|
function cInit(uint c, uint d) public {
|
|
|
|
Base.init(c, d);
|
|
|
|
}
|
|
|
|
}
|
2020-04-20 21:21:09 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2019-04-24 11:18:13 +00:00
|
|
|
// ----
|
|
|
|
// x() -> 0
|
|
|
|
// y() -> 0
|
|
|
|
// cInit(uint256): 2 ->
|
|
|
|
// x() -> 2
|
|
|
|
// y() -> 0
|
|
|
|
// cInit(uint256,uint256): 3, 3 ->
|
|
|
|
// x() -> 3
|
|
|
|
// y() -> 3
|