solidity/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all_2.sol
2019-12-03 21:44:10 +01:00

27 lines
470 B
Solidity

pragma experimental SMTChecker;
contract C {
uint a;
constructor(uint x) public {
a = x;
}
}
abstract contract B is C {
uint b;
constructor(uint x) public {
b = x + 10;
}
}
contract A is B {
constructor(uint x) B(x) C(x + 2) public {
assert(a == x + 2);
assert(b == x + 10);
assert(b == x + 5);
}
}
// ----
// Warning: (171-177): Overflow (resulting value larger than 2**256 - 1) happens here
// Warning: (294-312): Assertion violation happens here