mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2024-11-21 06:15:56 -07:00
Fix invocation of PythonType2LSL
Fixes #32. Thanks to @KrsityKu for the report and repro.
This commit is contained in:
parent
c1c1b8c58d
commit
a6cce58b5d
3 changed files with 16 additions and 1 deletions
|
@ -463,7 +463,7 @@ class deadcode(object):
|
|||
if value.nt == 'CONST':
|
||||
value = value.value[fieldidx]
|
||||
value = nr(nt='CONST', X=True, SEF=True,
|
||||
t=self.PythonType2LSL[type(value)], value=value)
|
||||
t=lslfuncs.PythonType2LSL[type(value)], value=value)
|
||||
value = self.Cast(value, 'float')
|
||||
SEF = True
|
||||
else: # assumed VECTOR or ROTATION per OKtoRemoveSymbol
|
||||
|
|
8
unit_tests/regression.suite/issue-32.lsl
Normal file
8
unit_tests/regression.suite/issue-32.lsl
Normal file
|
@ -0,0 +1,8 @@
|
|||
default
|
||||
{
|
||||
timer()
|
||||
{
|
||||
vector v = <1,2,3>;
|
||||
llOwnerSay((string)v.x);
|
||||
}
|
||||
}
|
7
unit_tests/regression.suite/issue-32.out
Normal file
7
unit_tests/regression.suite/issue-32.out
Normal file
|
@ -0,0 +1,7 @@
|
|||
default
|
||||
{
|
||||
timer()
|
||||
{
|
||||
llOwnerSay("1.000000");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue