mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
20 lines
294 B
Solidity
20 lines
294 B
Solidity
pragma experimental SMTChecker;
|
|
|
|
contract C
|
|
{
|
|
uint x;
|
|
function f() internal {
|
|
require(x < 10000);
|
|
x = x + 1;
|
|
}
|
|
function g(bool b) public {
|
|
x = 0;
|
|
if (b)
|
|
f();
|
|
// Should fail for `b == true`.
|
|
assert(x == 0);
|
|
}
|
|
}
|
|
// ----
|
|
// Warning: (209-223): Assertion violation happens here
|