nitlanguage
/
nit.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
parser: Remove tl_propdef* parser rules
[nit.git]
/
tests
/
base_init_inherit2.nit
1
import
kernel
2
3
class
A
4
init
ca
5
do
6
'A'
.
output
7
end
8
9
meth foo
10
do
11
'a'
.
output
12
'\n'
.
output
13
end
14
end
15
16
class
B
17
special
A
18
#alt1# init cb
19
#alt1# do
20
#alt1# 'B'.output
21
#alt1# '{'.output
22
#alt1# ca
23
#alt1# '}'.output
24
#alt1# end
25
26
#alt3# init cb
27
#alt3# do
28
#alt3# 'B'.output
29
#alt3# '{'.output
30
#alt3# ca
31
#alt3# '}'.output
32
#alt3# end
33
34
redef
meth foo
35
do
36
'b'
.
output
37
super
38
end
39
end
40
41
class
C
42
special
A
43
#alt2# init cc
44
#alt2# do
45
#alt2# 'C'.output
46
#alt2# '{'.output
47
#alt2# ca
48
#alt2# '}'.output
49
#alt2# end
50
51
#alt3# init cc
52
#alt3# do
53
#alt3# 'C'.output
54
#alt3# '{'.output
55
#alt3# ca
56
#alt3# '}'.output
57
#alt3# end
58
59
redef
meth foo
60
do
61
'c'
.
output
62
super
63
end
64
end
65
66
class
M
67
special
C
68
redef
meth foo
69
do
70
'm'
.
output
71
super
72
end
73
end
74
75
class
N
76
special
B
77
special
M
78
redef
meth foo
79
do
80
'n'
.
output
81
super
82
end
83
end
84
85
(
new
A
.
ca
).
foo
86
#alt0#(new B.ca).foo
87
#alt1#(new B.cb).foo
88
#alt2#(new B.ca).foo
89
#alt0#(new C.ca).foo
90
#alt1#(new C.ca).foo
91
#alt2#(new C.cc).foo
92
#alt0#(new M.ca).foo
93
#alt1#(new M.ca).foo
94
#alt2#(new M.cc).foo
95
#alt0#(new N.ca).foo
96
#alt1#(new N.cb).foo
97
#alt2#(new N.cc).foo
98
99