From a0de25830949bddffaeae73db2615a1496a32b61 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 14 Feb 2012 14:39:34 -0500 Subject: [PATCH] mm: force inheritance when selectioning local property Because of some optimizations, the inheritance is not always performed on classes. The selection of a local property is not aware of that and access thing event if the inheritance is not computed. This patch force the inheritance if the global property is not found. Signed-off-by: Jean Privat --- src/metamodel/inheritance.nit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/metamodel/inheritance.nit b/src/metamodel/inheritance.nit index f7326d2..9c7bfe1 100644 --- a/src/metamodel/inheritance.nit +++ b/src/metamodel/inheritance.nit @@ -274,6 +274,12 @@ redef class MMLocalClass return _local_property_by_global[glob] else if has_global_property(glob) then return inherit_local_property(glob) + else if not computed_super_classes then + compute_super_classes + computed_ancestors + inherit_global_properties + assert has_global_property(glob) + return inherit_local_property(glob) else abort end -- 1.7.9.5