-redef class MMGlobalProperty
- # Get the most specific local properties defined in superclasses of c
- private meth get_compatible_concrete_properties_for(cla: MMLocalClass): Array[MMConcreteProperty]
- do
- var impl_hier = _concrete_property_hierarchy
- if impl_hier.length == 1 then return [intro]
- var impls = new ArraySet[MMConcreteProperty]
- var clache = cla.che
- if true then
- #print "{cla.module}::{cla} get glob {intro.local_class}::{intro.name}"
- for sc in cla.che.direct_greaters do
- #print " try {sc.module}::{sc} {sc.che != null} {sc.crhe != null} {sc.che != null}"
- var p = sc[self]
- if p == null then continue
- var impl = p.concrete_property
- impls.add(impl)
- end
+ var ghier = glob.property_hierarchy
+ var supers = che.direct_greaters
+ if ghier.length == 1 then
+ # Unredefined property
+ impl = glob.intro
+ else if supers.length == 1 then
+ # Single inheritance
+ impl = supers.first[glob]