metamodel: rename 'universal' to 'enum'
[nit.git] / src / analysis / reachable_from_init_method_analysis_impl.nit
index 220ebd9..902fb24 100644 (file)
@@ -49,7 +49,7 @@ class RFIMABuilder
 end
 
 class RFIMAContext
-special ReachableFromInitMethodAnalysis
+       super ReachableFromInitMethodAnalysis
        readable var _reachable_from_init_iroutines: HashSet[IRoutine] = new HashSet[IRoutine]
 
        redef fun is_iroutine_reachable_from_init(ir: nullable IRoutine): Bool do
@@ -62,7 +62,7 @@ special ReachableFromInitMethodAnalysis
 end
 
 class RFIMAVisitor
-special ICodeVisitor
+       super ICodeVisitor
        readable var _context: RFIMAContext
        readable var _program: Program
 
@@ -86,7 +86,7 @@ special ICodeVisitor
                else if ic isa INew then
                        # FIXME: take only the last property on the redef. hierarchie
                        var t = ic.stype
-                       var cls = t.for_module(program.module).local_class
+                       var cls = t.for_module(program.main_module).local_class
                        var m = cls[ic.property.global].as(MMMethod)
                        var r = cls.new_instance_iroutine[m]
                        process_call(r)
@@ -112,12 +112,12 @@ special ICodeVisitor
                        end
                else if ic isa ICheckInstance then
                        var t = ic.stype
-                       var cls = t.for_module(program.module).local_class
+                       var cls = t.for_module(program.main_module).local_class
                        var ir = cls.checknew_iroutine
                        if ir != null then process_call(ir)
                else if ic isa IInitAttributes then
                        var t = ic.stype
-                       var cls = t.for_module(program.module).local_class
+                       var cls = t.for_module(program.main_module).local_class
                        var ir = cls.init_var_iroutine
                        if ir != null then process_call(ir)
                end