aboutsummaryrefslogtreecommitdiffstats
path: root/progs/tests/constants_in_inner_functions.sy
blob: 99704e719027c4cd7b597b5d3ca79798b590d5b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
start :: fn {

    q : int = 0

    f :: fn -> fn -> {
        g :: fn {
            q += 1
        }
        ret g
    }

    g := f()
    g()
    q <=> 1
    g()
    q <=> 2
    g()
    q <=> 3

}