update NOTICE and LICENSE
[nit.git] / tests / base_closure_multi.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Copyright 2009 Jean Privat <jean@pryen.org>
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 import kernel
18 fun a
19 !a1
20 !a2 #!alt1#
21 #alt2# !a3
22 #alt6# !a1
23 do
24 a1
25 a2 #!alt1#
26 #alt2# a3
27 end
28
29 fun b
30 !b1
31 !b2
32 do
33 b1
34 b2
35 end
36
37 fun c
38 !c1
39 do
40 c1
41 end
42
43 fun d
44 !d1
45 !d2
46 !d3
47 do
48 d1
49 d2
50 d3
51 end
52
53 0.output
54 a !a1 do
55 b !b1 do
56 1.output
57 !b2 do #!alt3#
58 2.output #!alt3#
59 #alt4# !b3 do
60 #alt4# 20.output
61 end
62 !a2 do
63 3.output
64 end
65 4.output
66 c !c1 do
67 d !d1 do
68 5.output
69 !d2 do
70 6.output
71 !d3 do 7.output
72 end
73 #alt5#a !a2 do
74 #alt5#!a1 do
75 #alt5#end
76 8.output