From: Jean Privat Date: Tue, 17 Jun 2014 01:14:04 +0000 (-0400) Subject: Merge: Give top-level methods some rules X-Git-Tag: v0.6.6~29 X-Git-Url: http://nitlanguage.org Merge: Give top-level methods some rules 1. explicit `self` is forbidden in top-level method 2. top-level methods can only be called without a explicit receiver In the code, there is workarounds for 3 hard-coded special cases: * `sys` and `exit`: because, for an unknown reason, intern method cannot be top-level. #493 * `args` because it is currently both in Sys and Object thus has a crazy status. #461 These rules are only enforced as it in `typing` but does not change the model, tools, or engines. Note: the first commits fix a bug in the `for` where the implicit `iterator` method was resolved with the `recv_is_self` flag always set to true. Pull-Request: #494 Reviewed-by: Alexandre Terrasa Reviewed-by: Lucas Bajolet --- 7d82bab6b7578952282491566c7e583a5cbeaa24