aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/013_branches_merge_variables.sol
blob: 0bd1cf3a0f4587f5c76171ddbaaa30627bc48606 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
pragma experimental SMTChecker;
// Variable is reset in both branches
contract C {
    function f(uint x) public pure {
        uint a = 2;
        if (x > 10) {
            a = 3;
        } else {
            a = 3;
        }
        assert(a == 3);
    }
}