@@ -57,9 +57,9 @@ redef class AMethPropdef
57
57
fun do_auto_super_init (modelbuilder : ModelBuilder )
58
58
do
59
59
var mclassdef = self .parent .as (AClassdef ).mclassdef
60
- if mclassdef == null then return # skip error
60
+ if mclassdef == null or mclassdef . is_broken then return # skip error
61
61
var mpropdef = self .mpropdef
62
- if mpropdef == null then return # skip error
62
+ if mpropdef == null or mpropdef . is_broken then return # skip error
63
63
var mmodule = mpropdef .mclassdef .mmodule
64
64
var anchor = mclassdef .bound_mtype
65
65
var recvtype = mclassdef .mclass .mclass_type
@@ -121,6 +121,11 @@ redef class AMethPropdef
121
121
if candidate .is_root_init then continue
122
122
123
123
var candidatedefs = candidate .lookup_definitions (mmodule , anchor )
124
+ if candidatedefs .is_empty then
125
+ # skip broken
126
+ is_broken = true
127
+ return
128
+ end
124
129
var candidatedef = candidatedefs .first
125
130
# TODO, we drop the others propdefs in the callsite, that is not great :(
126
131
@@ -136,6 +141,11 @@ redef class AMethPropdef
136
141
var the_root_init_mmethod = modelbuilder .the_root_init_mmethod
137
142
if the_root_init_mmethod != null and auto_super_inits .is_empty then
138
143
var candidatedefs = the_root_init_mmethod .lookup_definitions (mmodule , anchor )
144
+ if candidatedefs .is_empty then
145
+ # skip broken
146
+ is_broken = true
147
+ return
148
+ end
139
149
140
150
# Search the longest-one and checks for conflict
141
151
var candidatedef = candidatedefs .first
0 commit comments