Rename REAMDE to README.md
[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(i: Int) do
45 self.i = i
46 i.output
47 end
48 end
49
50 class F
51 super E
52 #alt1# var z: Int
53 end
54
55 var a = new A
56 var b = new B
57 var c = new C
58 var d = new D(4)
59 var e = new E(5)
60 var f = new F(6)