Documentation will like to have such an information easily available.
Signed-off-by: Jean Privat <jean@pryen.org>
super
end
+ # Is the property defined at the top_level of the module?
+ # Currently such a property are stored in `Object`
+ var is_toplevel: Bool writable = false
+
# Is the property a constructor?
# Warning, this property can be inherited by subclasses with or without being a constructor
# therefore, you should use `is_init_for` the verify if the property is a legal constructor for a given class
mprop = new MMethod(mclassdef, name, mvisibility)
mprop.is_init = is_init
mprop.is_new = n_kwnew != null
+ if nclassdef isa ATopClassdef then mprop.is_toplevel = true
if not self.check_redef_keyword(modelbuilder, nclassdef, n_kwredef, false, mprop) then return
else
if not self.check_redef_keyword(modelbuilder, nclassdef, n_kwredef, not self isa AMainMethPropdef, mprop) then return