nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9b9e54
)
modelize: useless attribute type is an advice
author
Jean Privat
<jean@pryen.org>
Fri, 19 Sep 2014 19:09:30 +0000
(15:09 -0400)
committer
Jean Privat
<jean@pryen.org>
Mon, 22 Sep 2014 15:28:42 +0000
(11:28 -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
52671e4
..
bf54e73
100644
(file)
--- a/
src/modelize/modelize_property.nit
+++ b/
src/modelize/modelize_property.nit
@@
-966,8
+966,8
@@
redef class AAttrPropdef
else if ntype != null then
if nexpr isa ANewExpr then
var xmtype = modelbuilder.resolve_mtype(mmodule, mclassdef, nexpr.n_type)
- if xmtype == mtype and modelbuilder.toolcontext.opt_warn.value >= 2 then
- modelbuilder.warning(ntype, "useless-type", "Warning: useless type definition")
+ if xmtype == mtype then
+ modelbuilder.advice(ntype, "useless-type", "Warning: useless type definition")
end
end
end