solidity/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain.sol
2020-07-07 12:16:18 +02:00

23 lines
301 B
Solidity

pragma experimental SMTChecker;
contract A {
uint x = 1;
}
contract B is A {
constructor() { x = 2; }
}
contract C is B {
constructor() { x = 3; }
}
contract D is C {
constructor() {
assert(x == 3);
assert(x == 2);
}
}
// ----
// Warning 4661: (211-225): Assertion violation happens here