typing: no more special case for `sys` and `exit`
authorJean Privat <jean@pryen.org>
Tue, 29 Jul 2014 14:08:43 +0000 (10:08 -0400)
committerJean Privat <jean@pryen.org>
Tue, 29 Jul 2014 17:13:37 +0000 (13:13 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/typing.nit

index 8b84367..d4e33eb 100644 (file)
@@ -252,8 +252,7 @@ private class TypeVisitor
 
                assert mproperty isa MMethod
 
-               if is_toplevel_context and recv_is_self and not mproperty.is_toplevel and name != "sys" and name != "exit" then
-                       # FIXME named methods are here as a workaround
+               if is_toplevel_context and recv_is_self and not mproperty.is_toplevel then
                        error(node, "Error: '{name}' is not a top-level method, thus need a receiver.")
                end
                if not recv_is_self and mproperty.is_toplevel then