solidity/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond_middle.sol

23 lines
304 B
Solidity
Raw Normal View History

pragma experimental SMTChecker;
contract A {
uint x = 1;
}
contract B is A {
2020-06-23 12:14:24 +00:00
constructor() { x = 2; }
}
contract C is A {
2020-06-23 12:14:24 +00:00
constructor() { x = 3; }
}
contract D is B, C {
2020-06-23 12:14:24 +00:00
constructor() {
assert(x == 3);
assert(x == 4);
}
}
// ----
2020-07-23 10:58:15 +00:00
// Warning 6328: (214-228): Assertion violation happens here