src: fix null receiver error on useless-signature warning
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 4 Oct 2015 18:55:39 +0000 (14:55 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 5 Oct 2015 16:43:20 +0000 (12:43 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/modelize/modelize_property.nit

index eec36f4..9cdf578 100644 (file)
@@ -1536,7 +1536,7 @@ redef class AAttrPropdef
                        ntype = n_intro.n_type.mtype
                end
                # check
-               if ntype ==null or ntype != n_type.mtype then return
+               if ntype == null or ntype != n_type.mtype or mpropdef == null then return
                modelbuilder.advice(n_type, "useless-signature", "Warning: useless type repetition on redefined attribute `{mpropdef.name}`")
        end
 end