2019-03-26 11:03:16 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract c {
|
|
|
|
uint x;
|
|
|
|
function f() internal returns (uint) {
|
|
|
|
x = x + 1;
|
|
|
|
return x;
|
|
|
|
}
|
2020-02-12 02:21:42 +00:00
|
|
|
function g() public returns (bool) {
|
2019-03-26 11:03:16 +00:00
|
|
|
bool b;
|
|
|
|
x = 100;
|
2020-02-12 02:21:42 +00:00
|
|
|
b = f() > 0;
|
2019-03-26 11:03:16 +00:00
|
|
|
assert(x == 102);
|
|
|
|
// Should fail.
|
|
|
|
assert(!b);
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-06-19 00:26:46 +00:00
|
|
|
// Warning 2661: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
|
|
|
// Warning 4661: (202-218): Assertion violation happens here
|
|
|
|
// Warning 4661: (242-252): Assertion violation happens here
|