Do not abort when comparing signatures, just return false
authorJean Privat <jean@pryen.org>
Thu, 25 Dec 2008 10:56:42 +0000 (05:56 -0500)
committerJean Privat <jean@pryen.org>
Thu, 25 Dec 2008 10:56:42 +0000 (05:56 -0500)
src/metamodel/static_type.nit
src/syntax/mmbuilder.nit

index e7a2c6e..2720fa4 100644 (file)
@@ -97,8 +97,7 @@ class MMSignature
                        return true
                end
                assert _recv.module == s.recv.module
-               assert arity == s.arity
-               assert (_return_type == null) == (s.return_type == null)
+               if arity != s.arity or (_return_type == null) != (s.return_type == null) then return false
                if _return_type != null and not _return_type < s.return_type then
                        return false
                end
index 56e2ace..5b4c47a 100644 (file)
@@ -674,7 +674,7 @@ redef class PPropdef
 
                        if s == null then
                                if v.params.length != isig.arity then
-                                       prop.node.printl("v.params.length {v.params.length} != isig.arity {isig.arity} ; {prop.full_name} vs {ip.full_name}")
+                                       #prop.node.printl("v.params.length {v.params.length} != isig.arity {isig.arity} ; {prop.full_name} vs {ip.full_name}")
                                        return
                                end
                                for p in v.params do