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

30 lines
509 B
Solidity
Raw Normal View History

pragma experimental SMTChecker;
contract F {
uint a;
2020-06-23 12:14:24 +00:00
constructor(uint x) {
a = x;
}
}
2019-12-03 20:44:06 +00:00
abstract contract E is F {}
abstract contract D is E {
2020-06-23 12:14:24 +00:00
constructor() {
a = 3;
}
}
2019-12-03 20:44:06 +00:00
abstract contract C is D {}
contract B is C {
2020-06-23 12:14:24 +00:00
constructor(uint x) F(x + 1) {
}
}
contract A is B {
2020-06-23 12:14:24 +00:00
constructor(uint x) B(x) {
assert(a == 3);
assert(a == 4);
}
}
// ----
2020-08-11 13:53:24 +00:00
// Warning 4984: (247-252): Overflow (resulting value larger than 2**256 - 1) happens here
2020-07-23 10:58:15 +00:00
// Warning 6328: (328-342): Assertion violation happens here