2020-04-06 15:26:59 +00:00
|
|
|
contract A {
|
|
|
|
uint public i;
|
|
|
|
uint public k;
|
|
|
|
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor(uint newI, uint newK) {
|
2020-04-06 15:26:59 +00:00
|
|
|
i = newI;
|
|
|
|
k = newK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
abstract contract B is A {
|
|
|
|
uint public j;
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor(uint newJ) {
|
2020-04-06 15:26:59 +00:00
|
|
|
j = newJ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
contract C is A {
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor(uint newI, uint newK) A(newI, newK) {}
|
2020-04-06 15:26:59 +00:00
|
|
|
}
|
|
|
|
contract D is B, C {
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor(uint newI, uint newK) B(newI) C(newI, newK + 1) {}
|
2020-04-06 15:26:59 +00:00
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
|
|
|
// ----
|
|
|
|
// constructor(): 2, 0 ->
|
|
|
|
// i() -> 2
|
|
|
|
// j() -> 2
|
|
|
|
// k() -> 1
|