solidity/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1_fail.sol

25 lines
552 B
Solidity
Raw Normal View History

2020-02-12 02:21:42 +00:00
pragma experimental SMTChecker;
contract A {
uint x;
function f() internal {
assert(x == 2);
--x;
}
}
contract C is A {
2020-06-23 12:14:24 +00:00
constructor() {
2020-02-12 02:21:42 +00:00
assert(x == 1);
++x;
f();
assert(x == 1);
}
}
// ----
2020-07-13 18:48:00 +00:00
// Warning 6328: (82-96): Assertion violation happens here
2020-07-23 10:58:15 +00:00
// Warning 6328: (148-162): Assertion violation happens here
// Warning 6328: (180-194): Assertion violation happens here
// Warning 4144: (100-103): Underflow (resulting value less than 0) happens here
// Warning 4144: (100-103): Underflow (resulting value less than 0) happens here