aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/while_loop_simple_5.sol
blob: 41559c99e9f1a980bef828f3f9a3a4d0aa1444b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
pragma experimental SMTChecker;
// Check that side-effects of condition are taken into account
contract C {
    function f(uint x, uint y) public pure {
        x = 7;
        while ((x = y) > 0) {
        }
        assert(x == 7);
    }
}
// ----
// Warning: (216-230): Assertion violation happens here\nNote that some information is erased after the execution of loops.\nYou can re-introduce information using require().