aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/loops/while_loop_simple_5.sol
blob: 6c81e36fb4e3a2cd7d0291542f695361ec7b6fe6 (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