end
end
- if mtype == null then
- mtype = v.get_mclass(self, "Object").mclass_type.as_nullable
+ var decltype = mtype
+ if mtype == null or mtype isa MNullType then
+ decltype = v.get_mclass(self, "Object").mclass_type.as_nullable
+ if mtype == null then mtype = decltype
end
- variable.declared_type = mtype
+ variable.declared_type = decltype
v.set_variable(self, variable, mtype)
#debug("var {variable}: {mtype}")
end
v.error(self, "Error: No super method to call for {mproperty}.")
return
- else if superprops.length > 1 then
- v.modelbuilder.warning(self, "Warning: NOT YET IMPLEMENTED: Conflicting super method to call for {mproperty}: {superprops.join(", ")}.")
- return
end
+ # FIXME: covariance of return type in linear extension?
var superprop = superprops.first
assert superprop isa MMethodDef