Merge: src: fix null receiver error on useless-signature warning
authorJean Privat <jean@pryen.org>
Tue, 6 Oct 2015 15:26:30 +0000 (11:26 -0400)
committerJean Privat <jean@pryen.org>
Tue, 6 Oct 2015 15:26:30 +0000 (11:26 -0400)
This caused most tools to crash on some useless types in redefined signatures. In my case, there was other problems in the same propdef, so it looks like it was not handling properly a "keep going" logic.

Pull-Request: #1744
Reviewed-by: Jean Privat <jean@pryen.org>

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