nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0767ae3
)
modelize: ask that attributes in refinements are either noautoninit or have a value
author
Jean Privat
<jean@pryen.org>
Fri, 29 May 2015 16:21:13 +0000
(12:21 -0400)
committer
Jean Privat
<jean@pryen.org>
Fri, 29 May 2015 16:21:13 +0000
(12:21 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/modelize/modelize_property.nit
patch
|
blob
|
history
diff --git
a/src/modelize/modelize_property.nit
b/src/modelize/modelize_property.nit
index
66d5e9f
..
9924245
100644
(file)
--- 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