modelize_property: correctly check signature for getter and setter
authorJean Privat <jean@pryen.org>
Tue, 15 Jul 2014 19:14:09 +0000 (15:14 -0400)
committerJean Privat <jean@pryen.org>
Tue, 15 Jul 2014 19:14:09 +0000 (15:14 -0400)
Some clone of bug 855796228e2ea1234246990c68741ccffbce93ae

src/modelize_property.nit

index 5b306f9..5a0ece8 100644 (file)
@@ -881,7 +881,7 @@ redef class AAttrPropdef
                                for i in [0..mysignature.arity[ do
                                        var myt = mysignature.mparameters[i].mtype
                                        var prt = msignature.mparameters[i].mtype
-                                       if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) and
+                                       if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) or
                                                        not prt.is_subtype(mmodule, mclassdef.bound_mtype, myt) then
                                                var node: ANode
                                                if nsig != null then node = nsig else node = self