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)
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>

1  2 
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

Simple merge
Simple merge
@@@ -1,4 -1,4 +1,4 @@@
- Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:389)
 -Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:396)
++Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:411)
  11
  21
  31
@@@ -1,4 -1,4 +1,4 @@@
- Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:389)
 -Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:396)
++Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:411)
  11
  21
  31
@@@ -1,4 -1,4 +1,4 @@@
- Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:389)
 -Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:396)
++Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:411)
  11
  21
  31