diff --git a/lslopt/lslfoldconst.py b/lslopt/lslfoldconst.py index f4833bb..d15f959 100644 --- a/lslopt/lslfoldconst.py +++ b/lslopt/lslfoldconst.py @@ -90,7 +90,7 @@ class foldconst(object): if nt == 'FNCALL': sym = self.symtab[0][node['name']] - if sym['Typ'] == 'integer' and 'min' in sym and 'max' in sym \ + if sym['Type'] == 'integer' and 'min' in sym and 'max' in sym \ and sym['min'] == 0 and sym['max'] == 1: return True diff --git a/testparser.py b/testparser.py index 2eb1cbe..265fbc8 100644 --- a/testparser.py +++ b/testparser.py @@ -301,6 +301,7 @@ class Test03_Optimizer(UnitTestCase): f += 4; f += -4.3; integer i; i = llGetListLength(L); + if (i&&llSameGroup(llGetOwner())) ++i; i *= -3.0; print(3+2); i |= !i;