reset orig var [uid|type]rel stinfo when rewriting optional variable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 07 Apr 2010 13:51:24 +0200
changeset 523 7f40b201b020
parent 519 9661f74aed0d
child 524 60255eecf96c
reset orig var [uid|type]rel stinfo when rewriting optional variable
stcheck.py
--- a/stcheck.py	Wed Mar 24 18:05:19 2010 +0100
+++ b/stcheck.py	Wed Apr 07 13:51:24 2010 +0200
@@ -428,7 +428,6 @@
         #assert not node.annotated
         node.accept(self)
         node.annotated = True
-
     def _visit_stmt(self, node):
         for var in node.defined_vars.itervalues():
             var.prepare_annotation()
@@ -513,8 +512,10 @@
                     pass
                 if stinfo['uidrel'] is rel:
                     newvar.stinfo['uidrel'] = rel
+                    stinfo['uidrel'] = None
                 if stinfo['typerel'] is rel:
                     newvar.stinfo['typerel'] = rel
+                    stinfo['typerel'] = None
         # shared references
         newvar.stinfo['constnode'] = var.stinfo['constnode']
         if newvar.stmt.solutions: # solutions already computed