redef class MClass
- # Get the public owner of 'self'.
- fun public_owner: MModule do
- var public_owner = self.intro_mmodule.public_owner
- if public_owner == null then
- return self.intro_mmodule
- else
- return public_owner
- end
- end
-
# Get direct parents of 'self'.
fun parents: Set[MClass] do
var ret = new HashSet[MClass]
# Get the list of all parameter types in 'self'.
fun parameter_types: Map[String, MType] do
var res = new HashMap[String, MType]
- for i in [0..intro.parameter_names.length[ do
- res[intro.parameter_names[i]] = intro.bound_mtype.arguments[i]
+ for p in mparameters do
+ res[p.name] = p
end
return res
end