diff -r cb27485ef5ae -r 4cc020ee70e2 rqlrewrite.py --- a/rqlrewrite.py Wed Mar 24 17:58:05 2010 +0100 +++ b/rqlrewrite.py Wed Mar 24 18:04:59 2010 +0100 @@ -41,15 +41,15 @@ except KeyError: continue stinfo = var.stinfo - if stinfo.get('uidrels'): + if stinfo.get('uidrel') is not None: continue # eid specified, no need for additional type specification try: - typerels = rqlst.defined_vars[varname].stinfo.get('typerels') + typerel = rqlst.defined_vars[varname].stinfo.get('typerel') except KeyError: assert varname in rqlst.aliases continue - if newroot is rqlst and typerels: - mytyperel = iter(typerels).next() + if newroot is rqlst and typerel is not None: + mytyperel = typerel else: for vref in newroot.defined_vars[varname].references(): rel = vref.relation() @@ -80,7 +80,7 @@ # tree is not annotated yet, no scope set so add the restriction # to the root rel = newroot.add_type_restriction(var, possibletypes) - stinfo['typerels'] = frozenset((rel,)) + stinfo['typerel'] = rel stinfo['possibletypes'] = possibletypes