# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1270641084 -7200
#      Wed Apr 07 13:51:24 2010 +0200
# Node ID 7f40b201b020d9e294ea744669de2391b5f88ee1
# Parent  9661f74aed0daf5669ea51469814ccb508e355ff
reset orig var [uid|type]rel stinfo when rewriting optional variable

diff --git a/stcheck.py b/stcheck.py
--- a/stcheck.py
+++ b/stcheck.py
@@ -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