nitc :: MModule :: properties
MProperty
associated to all MClassDef
of mclass
# All `MProperty` associated to all `MClassDef` of `mclass`
fun properties(mclass: MClass): Set[MProperty] do
if not self.properties_cache.has_key(mclass) then
var properties = new HashSet[MProperty]
var parents = new Array[MClass]
if self.flatten_mclass_hierarchy.has(mclass) then
parents.add_all(mclass.in_hierarchy(self).direct_greaters)
end
for parent in parents do
properties.add_all(self.properties(parent))
end
for mclassdef in mclass.mclassdefs do
if not self.in_importation <= mclassdef.mmodule then continue
for mprop in mclassdef.intro_mproperties do
properties.add(mprop)
end
end
self.properties_cache[mclass] = properties
end
return properties_cache[mclass]
end
src/compiler/abstract_compiler.nit:4630,2--4650,4