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

22 lines
275 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 B {
}
contract D is C {
2020-06-23 12:14:24 +00:00
constructor() {
assert(x == 2);
assert(x == 3);
}
}
// ----
2020-06-23 12:14:24 +00:00
// Warning 4661: (185-199): Assertion violation happens here