syntax: 'meth' -> 'fun', 'attr' -> 'var'
[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
19 fun a
20 with a1
21 with a2 #!alt1#
22 #alt2# with a3
23 do
24 a1
25 a2 #!alt1#
26 #alt2# a3
27 end
28
29 fun b
30 with b1
31 with b2
32 do
33 b1
34 b2
35 end
36
37 fun c
38 with c1
39 do
40 c1
41 end
42
43 fun d
44 with d1
45 with d2
46 with d3
47 do
48 d1
49 d2
50 d3
51 end
52
53 0.output
54 a with do
55 b with do
56 1.output
57 with do #!alt3#
58 2.output #!alt3#
59 #alt4# with do
60 #alt4# 20.output
61 end
62 with do
63 3.output
64 end
65 4.output
66 c with do
67 d with do
68 5.output
69 with do
70 6.output
71 with do 7.output
72 end
73 8.output