[rql rewriter] take care not to introduce snippets into a neged scope
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 05 Apr 2011 12:47:18 +0200
changeset 7176 f2a976cf7dac
parent 7169 3bad3b778b4c
child 7177 0f2905cbe443
[rql rewriter] take care not to introduce snippets into a neged scope
rqlrewrite.py
--- a/rqlrewrite.py	Fri Apr 01 16:02:45 2011 +0200
+++ b/rqlrewrite.py	Tue Apr 05 12:47:18 2011 +0200
@@ -257,6 +257,11 @@
                 insert_scope = None
                 for vi in self.varinfos:
                     scope = vi.get('stinfo', {}).get('scope', self.select)
+                    while True:
+                        negstmt = scope.neged()
+                        if negstmt is None:
+                            break
+                        scope = negstmt.scope
                     if insert_scope is None:
                         insert_scope = scope
                     else: