if not c.kind.need_init then continue
st = st.anchor_to(mmodule, mclassdef.bound_mtype)
var candidate = self.try_get_mproperty_by_name2(nclassdef, mmodule, st, "init").as(nullable MMethod)
- if candidate != null and candidate.intro.msignature.arity == 0 then
- combine.add(candidate)
- continue
+ if candidate != null then
+ if candidate.intro.msignature != null then
+ if candidate.intro.msignature.arity == 0 then
+ combine.add(candidate)
+ continue
+ end
+ end
end
var inhc2 = c.inherit_init_from
if inhc2 == null then inhc2 = c
# No error, try to go deeper in generic types
if node isa AType then
- for a in node.n_types do check_visibility(a, a.mtype.as(not null), mpropdef)
+ for a in node.n_types do
+ var t = a.mtype
+ if t == null then continue # Error, thus skipped
+ check_visibility(a, t, mpropdef)
+ end
else if mtype isa MGenericType then
for t in mtype.arguments do check_visibility(node, t, mpropdef)
end
mwriteprop = new MMethod(mclassdef, writename, mvisibility)
if not self.check_redef_keyword(modelbuilder, mclassdef, nwkwredef, false, mwriteprop) then return
else
- if not self.check_redef_keyword(modelbuilder, mclassdef, nwkwredef, true, mwriteprop) then return
+ if not self.check_redef_keyword(modelbuilder, mclassdef, nwkwredef or else n_kwredef, true, mwriteprop) then return
if nwritable != null then
check_redef_property_visibility(modelbuilder, nwritable.n_visibility, mwriteprop)
end
for i in [0..mysignature.arity[ do
var myt = mysignature.mparameters[i].mtype
var prt = msignature.mparameters[i].mtype
- if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) and
+ if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) or
not prt.is_subtype(mmodule, mclassdef.bound_mtype, myt) then
var node: ANode
if nsig != null then node = nsig else node = self