From 3b4530063a7f93145dab3c1399effa2da23001b3 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 20 Feb 2015 12:20:12 +0700 Subject: [PATCH] modelize: accepts `noautoinit` the new name of `noinit`. Signed-off-by: Jean Privat --- src/frontend/check_annotation.nit | 1 + src/modelize/modelize_property.nit | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 1.7.9.5