model: remove public_owner methods
authorJean Privat <jean@pryen.org>
Wed, 17 Sep 2014 23:58:16 +0000 (19:58 -0400)
committerJean Privat <jean@pryen.org>
Wed, 17 Sep 2014 23:58:16 +0000 (19:58 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/model/mmodule.nit
src/model_utils.nit

index 5cce237..490883b 100644 (file)
@@ -192,18 +192,6 @@ class MModule
                end
        end
 
-       # placebo for old module nesting hierarchy
-       fun public_owner: nullable MModule
-       do
-               var mgroup = self.mgroup
-               if mgroup == null then return null
-               mgroup = mgroup.mproject.root
-               if mgroup.mmodules.is_empty then return null
-               var res = mgroup.fuzzy_owner
-               if res == self then return null
-               return res
-       end
-
        # Return true if a class or a property introduced in `intro_mmodule` with a visibility of `visibility` is visible in self.
        fun is_visible(intro_mmodule: MModule, visibility: MVisibility): Bool
        do
index 12c07e3..f184eec 100644 (file)
@@ -213,16 +213,6 @@ end
 
 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]