Rename REAMDE to README.md
[nit.git] / tests / base_prot_sig.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 class A
17 fun pubA(a: A) do end
18 protected fun proA(a: A) do end
19 private fun priA(a: A) do end
20
21 var vpubA: nullable A is writable, noinit
22 protected var vproA: nullable A is protected writable, noinit
23 private var vpriA: nullable A is noinit
24
25 var vpubA2 = new A is writable
26 protected var vproA2 = new A is protected writable
27 private var vpriA2 = new A
28
29 #alt1#fun pubB(a: B) do end
30 #alt2#protected fun proB(a: B) do end
31 private fun priB(a: B) do end
32
33 #alt3#var vpubB: nullable B is writable, noinit
34 #alt4#protected var vproB: nullable B is protected writable, noinit
35 private var vpriB: nullable B is noinit
36
37 #alt5#var vpubB2 = new B is writable
38 #alt6#protected var vproB2 = new B is protected writable
39 private var vpriB2 = new B
40
41
42 end
43
44 private class B
45 fun pubA(a: A) do end
46 #alt7#protected fun proA(a: A) do end
47 private fun priA(a: A) do end
48
49 var vpubA: nullable A is writable, noinit
50 #alt7#protected var vproA: nullable A is protected writable, noinit
51 private var vpriA: nullable A is noinit
52
53 var vpubA2 = new A is writable
54 #alt7#protected var vproA2 = new A is protected writable
55 private var vpriA2 = new A
56
57 fun pubB(a: B) do end
58 #alt7#protected fun proB(a: B) do end
59 private fun priB(a: B) do end
60
61 var vpubB: nullable B is writable, noinit
62 #alt7#protected var vproB: nullable B is protected writable, noinit
63 private var vpriB: nullable B is noinit
64
65 var vpubB2 = new B is writable
66 #alt7#protected var vproB2 = new B is protected writable
67 private var vpriB2 = new B
68
69
70 end