Merge: Add annotation `fixed` for virtual types
authorJean Privat <jean@pryen.org>
Wed, 23 Jul 2014 18:22:52 +0000 (14:22 -0400)
committerJean Privat <jean@pryen.org>
Wed, 23 Jul 2014 18:22:52 +0000 (14:22 -0400)
Fixed virtual types prevent redefinition is subclasses

~~~
class A
   type F: Foo is fixed
end
class B
   super A
   redef type F: Foo # Static error
end
~~~

Currently, there is no really apparent benefit of fixed virtual types because the hack of `typing::check_subtype`. Thus this is only a step toward the resolution of #298.

Note: the first commits introduce the basic verification on redefinitons of virtual types that is missing; but nobody saw that there was no checks.

Pull-Request: #611
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

1  2 
src/modelize_property.nit

Simple merge