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

22 lines
327 B
Solidity
Raw Normal View History

contract A {
uint x;
constructor() {
x = 42;
}
function f() public view returns(uint256) {
return x;
}
}
contract B is A {
uint y = f();
}
contract C is B {
function g() public view {
assert(y == 42);
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
// ----
2021-10-06 09:53:03 +00:00
// Info 1180: Contract invariant(s) for :C:\n(!(y <= 41) && !(y >= 43))\n