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

25 lines
527 B
Solidity

contract A {
int x = 0;
modifier m virtual {
assert(x == 0); // should hold
assert(x == 42); // should fail
_;
}
}
contract C is A {
modifier m override {
assert(x == 1); // This assert is not reachable, should NOT be reported
_;
}
function f() public A.m returns (uint) {
}
}
// ====
// SMTEngine: all
// ----
// Warning 6328: (83-98): CHC: Assertion violation happens here.
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.