From f5d150f7c96584bad28ee6918b1b6e85d70e7538 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 17 Jun 2015 02:51:46 +0200 Subject: [PATCH] Fix typo in IsBool and add coverage test. Report and fix by Code Violet. --- lslopt/lslfoldconst.py | 2 +- testparser.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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;