update NOTICE and LICENSE
[nit.git] / tests / test_closure_inlined_return.nit
1 fun foo !k
2 do
3 ' '.output
4 '<'.output
5 1.output
6 k
7 ' '.output
8 '>'.output
9 1.output
10 end
11
12 fun test
13 do
14 var a = [10, 20, 30]
15 '<'.output
16 0.output
17 var i = 0
18 while i < 3 do
19 foo !k do
20 ' '.output
21 ' '.output
22 '<'.output
23 2.output
24 ' '.output
25 ' '.output
26 '='.output
27 a[i].output # a[i] is usually inlined
28 if i == 1 then
29 #alt1#break
30 end
31 ' '.output
32 ' '.output
33 '>'.output
34 2.output
35 end
36 i += 1
37 end
38 '>'.output
39 0.output
40 end
41
42 test