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

24 lines
403 B
Solidity
Raw Normal View History

contract A {
uint x;
function h() public view {
assert(x == 0);
}
}
contract B is A {
function g() public view {
assert(x == 0);
}
}
contract C is B {
function f() public view {
assert(x == 0);
}
}
// ====
2021-03-31 15:11:54 +00:00
// SMTEngine: all
// SMTSolvers: z3
// ----
2021-10-06 09:53:03 +00:00
// Info 1180: Contract invariant(s) for :A:\n(x <= 0)\nContract invariant(s) for :C:\n(x <= 0)\nContract invariant(s) for :B:\n(x <= 0)\n