Forgot to exclude globals from this optimization somehow.

This commit is contained in:
Sei Lisa 2015-03-06 22:55:28 +01:00
parent 7c35cf64df
commit c1d837674c

View file

@ -839,7 +839,7 @@ class foldconst(object):
parent[index] = {'nt':'CONST', 'SEF':True, 't':node['t'],
'value':value}
return
if nt == 'LIST' and len(child) == 1:
if nt == 'LIST' and len(child) == 1 and not self.globalmode:
node = parent[index] = self.Cast(child[0], 'list')
if issef:
node['SEF'] = True