mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix typo in IsBool and add coverage test. Report and fix by Code Violet.
This commit is contained in:
parent
52ebe20a67
commit
f5d150f7c9
2 changed files with 2 additions and 1 deletions
|
@ -90,7 +90,7 @@ class foldconst(object):
|
||||||
|
|
||||||
if nt == 'FNCALL':
|
if nt == 'FNCALL':
|
||||||
sym = self.symtab[0][node['name']]
|
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:
|
and sym['min'] == 0 and sym['max'] == 1:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -301,6 +301,7 @@ class Test03_Optimizer(UnitTestCase):
|
||||||
f += 4; f += -4.3;
|
f += 4; f += -4.3;
|
||||||
integer i;
|
integer i;
|
||||||
i = llGetListLength(L);
|
i = llGetListLength(L);
|
||||||
|
if (i&&llSameGroup(llGetOwner())) ++i;
|
||||||
i *= -3.0;
|
i *= -3.0;
|
||||||
print(3+2);
|
print(3+2);
|
||||||
i |= !i;
|
i |= !i;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue