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)
commit1f67b392d1ab94a5285c291ee534bff65b6e0933
treeaea5c034ebb5465ffa4e3063ed01e07813612288
parent63330bddfb9d5ea5df167ed81e1f01e5f5118137
parent8c287fe37bbadc092de31c36173b1f8601bff65d
Merge: Add annotation `fixed` for virtual types

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>
src/modelize_property.nit