solidity/test/libsolidity/smtCheckerTests/external_calls/external_safe.sol

21 lines
525 B
Solidity
Raw Normal View History

abstract contract D {
function d() external virtual;
}
contract C {
uint x;
D d;
function f() public {
if (x < 10)
++x;
}
function g() public {
d.d();
assert(x < 11);
}
}
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!(x >= 11)\nReentrancy property(ies) for :C:\n!(<errorCode> = 1)\n((!(x <= 10) || !(<errorCode> >= 3)) && (!(x <= 10) || !(x' >= 11)))\n<errorCode> = 0 -> no errors\n<errorCode> = 1 -> Overflow at ++x\n<errorCode> = 3 -> Assertion failed at assert(x < 11)\n