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

21 lines
344 B
Solidity

contract C {
uint x = initX();
function initX() internal pure returns (uint) {
return 42;
}
}
contract D is C {
uint y;
constructor() {
assert(x == 42);
y = x;
}
}
// ====
// SMTEngine: bmc
// ----
// Info 6002: BMC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.