Merge: SELF type
authorJean Privat <jean@pryen.org>
Tue, 25 Nov 2014 01:04:13 +0000 (20:04 -0500)
committerJean Privat <jean@pryen.org>
Tue, 25 Nov 2014 01:04:13 +0000 (20:04 -0500)
commit668197856e878e31e134c738b5444e7d0207a382
tree98c927ac4f7cc19d514d15bcc6f251e123e11455
parent550eb90522ae1b8c0c2b611b0fae5f7bf60739d7
parent37076db10aaa3b36c3b67c31a4bc47168ae0387f
Merge: SELF type

If Object defines a virtual type SELF, redefines it automatically in all subclasses. Also checks for some conditions on the declaration of SELF: it must be public, it must not be fixed and it must be declared on Object (or not declared at all). These conditions ensures that its refinements are valid.

The error messages when trying to redefining SELF could be improved. Maybe adding a special case preventing any redef of SELF?

Pull-Request: #902
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Etienne M. Gagnon <egagnon@j-meg.com>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/java/java.nit
lib/standard/kernel.nit
tests/sav/nitg-e/fixme/base_gen_reassign_alt4.res
tests/sav/nitg-e/fixme/base_gen_reassign_alt5.res
tests/sav/nitg-e/fixme/base_gen_reassign_alt6.res