nitlanguage
/
nit.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
lib: improve synopsis and doc of many libs
[nit.git]
/
tests
/
base_init_inherit4.nit
1
import
kernel
2
3
redef interface
Object
4
5
fun
foo
6
do
7
'a'
.
output
8
'\n'
.
output
9
end
10
end
11
12
interface
M
13
redef fun
foo
14
do
15
'm'
.
output
16
super
17
end
18
end
19
20
class
B
21
init
cb
22
do
23
'B'
.
output
24
end
25
26
redef fun
foo
27
do
28
'b'
.
output
29
super
30
end
31
end
32
33
interface
N
34
redef fun
foo
35
do
36
'n'
.
output
37
super
38
end
39
end
40
41
class
O
42
super
M
43
super
B
44
redef fun
foo
45
do
46
'o'
.
output
47
super
48
end
49
end
50
51
class
P
52
super
B
53
super
N
54
redef fun
foo
55
do
56
'p'
.
output
57
super
58
end
59
end
60
61
class
Q
62
#alt0#super M
63
#alt0#super B
64
#alt0#super N
65
66
#alt1#super O
67
#alt1#super N
68
69
#alt2#super M
70
#alt2#super P
71
72
#alt3#super O
73
#alt3#super P
74
redef fun
foo
75
do
76
'q'
.
output
77
super
78
end
79
end
80
81
(
new
B
.
cb
).
foo
82
(
new
O
.
cb
).
foo
83
(
new
P
.
cb
).
foo
84
(
new
Q
.
cb
).
foo
85