var readtype = v.get_variable(self, variable)
if readtype == null then return
+ read_type = readtype
+
var writetype = variable.declared_type
if writetype == null then return
end
# FIXME: covariance of return type in linear extension?
var superprop = superprops.first
- assert superprop isa MMethodDef
var msignature = v.resolve_signature_for(superprop, recvtype, true)
var args = self.n_args.to_a
v.error(self, "Type error: cannot instantiate the formal type {recvtype}.")
return
end
+ else
+ if recvtype.mclass.kind == abstract_kind then
+ v.error(self, "Cannot instantiate abstract class {recvtype}.")
+ return
+ else if recvtype.mclass.kind == interface_kind then
+ v.error(self, "Cannot instantiate interface {recvtype}.")
+ return
+ end
end
var name: String