ntype, false)
if mtype == null then continue # Skip because of error
if not mtype isa MClassType then
- error(ntype, "Error: supertypes cannot be a formal type.")
+ error(ntype, "Error: a supertype cannot be a formal type.")
continue
end
var superclass = mtype.mclass
for nsc in nclassdef.n_superclasses do
var ntype = nsc.n_type
var mtype = ntype.mtype
- if mtype == null then continue
- assert mtype isa MClassType
+
+ # If the supertype is `null` or don’t refer to a class, we
+ # already raised an error.
+ if not mtype isa MClassType then continue
+
var sc = mtype.mclass
if not parents.has(sc) or sc == objectclass then
# Skip the warning on generated code
redef class AExternClasskind
redef fun mkind do return extern_kind
end
+redef class ASubsetClasskind
+ redef fun mkind do return subset_kind
+end
redef class AFormaldef
# The associated parameter type