modelize: useless attribute type is an advice
authorJean Privat <jean@pryen.org>
Fri, 19 Sep 2014 19:09:30 +0000 (15:09 -0400)
committerJean 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

index 52671e4..bf54e73 100644 (file)
@@ -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