Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / base_attr_init_val_inh_raf.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 base_attr_init_val_inh
16
17 redef class A
18 var aa1 = new W(3)
19 var aa2: W = a1
20 var aa3: W = aa1
21 end
22
23 redef class B
24 super A
25 var bb1 = new W(4)
26 var bb2: W = b1
27 var bb3: W = a1
28 var bb4: W = bb1
29 var bb5: W = aa1
30 end
31
32 var test1 = new A
33 test1.aa1.v.output
34 test1.aa2.v.output
35 test1.aa3.v.output
36
37 '\n'.output
38
39 var test2 = new B
40 test2.aa1.v.output
41 test2.aa2.v.output
42 test2.aa3.v.output
43 test2.bb1.v.output
44 test2.bb2.v.output
45 test2.bb3.v.output
46 test2.bb4.v.output
47 test2.bb5.v.output
48