diff --git a/lslopt/lsldeadcode.py b/lslopt/lsldeadcode.py index f158a10..7dba5fb 100644 --- a/lslopt/lsldeadcode.py +++ b/lslopt/lsldeadcode.py @@ -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 diff --git a/unit_tests/regression.suite/issue-32.lsl b/unit_tests/regression.suite/issue-32.lsl new file mode 100644 index 0000000..f1152e0 --- /dev/null +++ b/unit_tests/regression.suite/issue-32.lsl @@ -0,0 +1,8 @@ +default +{ + timer() + { + vector v = <1,2,3>; + llOwnerSay((string)v.x); + } +} diff --git a/unit_tests/regression.suite/issue-32.out b/unit_tests/regression.suite/issue-32.out new file mode 100644 index 0000000..6de2365 --- /dev/null +++ b/unit_tests/regression.suite/issue-32.out @@ -0,0 +1,7 @@ +default +{ + timer() + { + llOwnerSay("1.000000"); + } +}