model: intro `MModule::first_real_mmodule` to get the first non-fictive module
[nit.git] / src / transform.nit
index 2fda94e..dac3c4f 100644 (file)
@@ -41,7 +41,9 @@ private class TransformPhase
        do
                var val
 
-               var v = new TransformVisitor(self, npropdef.mpropdef.as(not null))
+               var m = npropdef.mpropdef
+               if m == null then return
+               var v = new TransformVisitor(self, m)
                v.enter_visit(npropdef)
 
                val = new ASTValidationVisitor
@@ -71,12 +73,6 @@ private class TransformVisitor
                node.full_transform_visitor(self)
        end
 
-       # Get a primitive class or display a fatal error on `location`.
-       fun get_class(location: AExpr, name: String): MClass
-       do
-               return mmodule.get_primitive_class(name)
-       end
-
        # Get a primitive method or display a fatal error on `location`.
        fun get_method(location: AExpr, name: String, recv: MClass): MMethod
        do