don't record deambiguifier when it has no type restriction using 'is', so we don't miss later some available constraints stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 20 Jan 2010 11:27:41 +0100
branchstable
changeset 4285 ea590101691c
parent 4280 15d541321a8c
child 4286 6801093af29c
don't record deambiguifier when it has no type restriction using 'is', so we don't miss later some available constraints
server/rqlannotation.py
--- a/server/rqlannotation.py	Wed Jan 20 10:13:02 2010 +0100
+++ b/server/rqlannotation.py	Wed Jan 20 11:27:41 2010 +0100
@@ -366,6 +366,10 @@
                     # we know variable won't be invariant, try to use
                     # it to deambguify the current variable
                     otheretypes = self.varsols[deambiguifier]
+            if not deambiguifier.stinfo['typerels']:
+                # if deambiguifier has no type restriction using 'is',
+                # don't record it
+                deambiguifier = None
         elif isinstance(other, Constant) and other.uidtype:
             otheretypes = (other.uidtype,)
             deambiguifier = None