lib/core/stream: LineIterator use CachedIterator
[nit.git] / tests / names / n0.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 # Root module
16 module n0
17
18 import end
19
20 # Root interface
21 interface Object
22 end
23
24 # A public class
25 class A
26 # A public method in a public class
27 fun a do end
28
29 # A private method in a public class
30 private fun z do end
31 end
32
33 # A public subclass in the same module
34 class A0
35 super A
36 super P
37
38 # Redefinition it the same module of a public method
39 redef fun a do end
40
41 # Redefinition it the same module of a private method
42 redef fun z do end
43
44 # Redefinition it the same module of a private method
45 redef fun p do end
46 end
47
48 # A private class
49 private class P
50 # A private method in a private class
51 fun p do end
52 end
53
54 # A private subclass introduced in the same module
55 private class P0
56 super A
57 super P
58
59 # Redefinition it the same module of a public method
60 redef fun a do end
61
62 # Redefinition it the same module of a private method
63 redef fun z do end
64
65 # Redefinition it the same module of a private method
66 redef fun p do end
67 end