Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / base_init_combine.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 import kernel
16
17 class A
18 init do 1.output
19 end
20
21 class B
22 init do 2.output
23 end
24
25 class C
26 super A
27 super B
28
29 init do 3.output
30 end
31
32 class D
33 super A
34 super B
35
36 var i: Int
37 end
38
39 class E
40 super A
41 super B
42
43 var i: Int
44 init do
45 i.output
46 end
47 end
48
49 class F
50 super E
51 #alt1# var z: Int
52 end
53
54 var a = new A
55 var b = new B
56 var c = new C
57 var d = new D(4)
58 var e = new E(5)
59 var f = new F(6)