Fix typo in IsBool and add coverage test. Report and fix by Code Violet.

This commit is contained in:
Sei Lisa 2015-06-17 02:51:46 +02:00
parent 52ebe20a67
commit f5d150f7c9
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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;