Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / base_prot2.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_prot0
16 private import base_prot
17
18 class B
19 super A
20 redef fun pub do 10.output
21 redef fun pro do 11.output
22 #alt1#redef fun pri do 12.output
23 fun o do
24 pub
25 pro
26 #alt2#pri
27 end
28 end
29
30 class O2
31 fun o
32 do
33 var a = new B
34 a.pub
35 #alt3#a.pro
36 #alt4#a.pri
37 13.output
38 end
39 init do end
40 end
41
42 (new O2).o