solidity/test/libsolidity/smtCheckerTests/inheritance/constructor_uses_function_base.sol
2023-03-09 14:59:32 +01:00

22 lines
384 B
Solidity

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);
}
}
// ====
// SMTEngine: all
// ----
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.