Check that it's a variable definition before collapsing or giving warning.

This commit is contained in:
Sei Lisa 2014-07-27 22:03:31 +02:00
parent 100de9c8e9
commit 64e5d0dc92

View file

@ -367,6 +367,7 @@ class optimizer(object):
self.Fold(entry[2][event][2], False)
elif type(entry[2]) == tuple:
self.Fold(entry[2]) # global
if len(entry) == 3:
val = entry[2]
# Unfold constant
if val[0] == 'EXPR' and val[2][0] == CONSTANT: