solidity/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1.sol
2020-07-07 12:16:18 +02:00

22 lines
371 B
Solidity

pragma experimental SMTChecker;
contract A {
uint x;
function f() internal {
assert(x == 1);
--x;
}
}
contract C is A {
constructor() {
assert(x == 0);
++x;
f();
assert(x == 0);
}
}
// ----
// Warning 4144: (100-103): Underflow (resulting value less than 0) happens here
// Warning 4144: (100-103): Underflow (resulting value less than 0) happens here