From 56141490894cf0b938a7eabc417318e047b6a911 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 29 May 2015 12:21:13 -0400 Subject: [PATCH] modelize: ask that attributes in refinements are either noautoninit or have a value Signed-off-by: Jean Privat --- src/modelize/modelize_property.nit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modelize/modelize_property.nit b/src/modelize/modelize_property.nit index 66d5e9f..9924245 100644 --- a/src/modelize/modelize_property.nit +++ b/src/modelize/modelize_property.nit @@ -1217,6 +1217,10 @@ redef class AAttrPropdef return end + if not mclassdef.is_intro and not has_value and not noinit then + modelbuilder.advice(self, "attr-in-refinement", "Warning: attributes in refinement need a value or `noautoinit`.") + end + var writename = name + "=" var atwritable = self.get_single_annotation("writable", modelbuilder) if atwritable != null then -- 1.7.9.5