mixin: look for top-level methods in `Sys`.
authorJean Privat <jean@pryen.org>
Wed, 8 Apr 2015 13:15:03 +0000 (20:15 +0700)
committerJean Privat <jean@pryen.org>
Fri, 10 Apr 2015 10:31:53 +0000 (17:31 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

src/mixin.nit

index 94d0c32..1ee4109 100644 (file)
@@ -52,7 +52,8 @@ redef class ToolContext
                                mainmodule.is_fictive = true
                        end
 
                                mainmodule.is_fictive = true
                        end
 
-                       var recv = mainmodule.object_type
+                       var recv = mainmodule.sys_type
+                       assert recv != null
                        var mclassdef = new MClassDef(mainmodule, recv, location)
                        mclassdef.add_in_hierarchy
 
                        var mclassdef = new MClassDef(mainmodule, recv, location)
                        mclassdef.add_in_hierarchy