From: Jean Privat Date: Tue, 10 Mar 2015 13:51:12 +0000 (+0700) Subject: Merge: Abstract attribute X-Git-Tag: v0.7.3~33 X-Git-Url: http://nitlanguage.org Merge: Abstract attribute Add the annotation `abstract` on attributes. It is just a syntactic sugar to define a couple of abstract getter-setters with a shared documentation without an associated slot in the instance so it can be used in interfaces. ~~~nit interface Foo var a: Object is abstract end class Bar super Foo # A concrete attribute that redefine the abstract one redef var a end class Baz super Foo var real_a: Object # A pair of concrete methods that redefine the abstract attribute redef fun a do return real_a redef fun a=(x) do real_a = x end ~~~ The visibility rules are unchanged with regard to concrete attributes, so by default the writer is private. Needed cleaning (and a bugfix) are included in the PR Pull-Request: #1177 Reviewed-by: Lucas Bajolet Reviewed-by: Alexandre Terrasa Reviewed-by: Alexis Laferrière --- d66b06f17fddd8045368ba5f5b483915582cbd64