typing: check correct usage of top-level methods
authorJean Privat <jean@pryen.org>
Wed, 11 Jun 2014 02:00:17 +0000 (22:00 -0400)
committerJean Privat <jean@pryen.org>
Mon, 16 Jun 2014 16:03:10 +0000 (12:03 -0400)
commit8c96cf694bea41704433f991a7604ae5160ad641
treea58ee1979d85d428b3b9e8038a326abceb9a2942
parenteaaae2c7db75fb97234edbe86bef614877e5a3c2
typing: check correct usage of top-level methods

First, the body of top-level methods has two constraints:
 * no explicit self
 * implicit self can only call other top-level methods

Second, only self can invoke top-level methods.
Eg. no `6.print("hello")`

Signed-off-by: Jean Privat <jean@pryen.org>
src/typing.nit