From: Jean Privat Date: Fri, 20 Feb 2015 05:20:12 +0000 (+0700) Subject: modelize: accepts `noautoinit` the new name of `noinit`. X-Git-Tag: v0.7.2~12^2~3 X-Git-Url: http://nitlanguage.org modelize: accepts `noautoinit` the new name of `noinit`. Signed-off-by: Jean Privat --- diff --git a/src/frontend/check_annotation.nit b/src/frontend/check_annotation.nit index a51bece..9408e95 100644 --- a/src/frontend/check_annotation.nit +++ b/src/frontend/check_annotation.nit @@ -83,6 +83,7 @@ noinit readonly writable autoinit +noautoinit cached nosuper old_style_init diff --git a/src/modelize/modelize_property.nit b/src/modelize/modelize_property.nit index 6cc7aff..83acc62 100644 --- a/src/modelize/modelize_property.nit +++ b/src/modelize/modelize_property.nit @@ -976,10 +976,11 @@ redef class AAttrPropdef has_value = n_expr != null or n_block != null var atnoinit = self.get_single_annotation("noinit", modelbuilder) + if atnoinit == null then atnoinit = self.get_single_annotation("noautoinit", modelbuilder) if atnoinit != null then noinit = true if has_value then - modelbuilder.error(atnoinit, "Error: `noinit` attributes cannot have an initial value") + modelbuilder.error(atnoinit, "Error: `noautoinit` attributes cannot have an initial value") return end end