mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
nonlist + list was returning the type of the nonlist element. Fixed and added a
regression test. Funnily enough, it was correct if explicit cast was active. Removed from explicit cast now that it's active for all.
This commit is contained in:
parent
aa74e6ed64
commit
d8649deebd
2 changed files with 3 additions and 3 deletions
|
@ -1128,10 +1128,10 @@ list lazy_list_set(list L, integer i, list v)
|
|||
if self.explicitcast:
|
||||
if ltype == 'list' != rtype:
|
||||
rexpr = {'nt':'CAST', 't':ltype, 'ch':[rexpr]}
|
||||
#rtype = ltype # unused
|
||||
elif rtype == 'list' != ltype:
|
||||
term = {'nt':'CAST', 't':rtype, 'ch':[term]}
|
||||
ltype = rtype
|
||||
if rtype == 'list':
|
||||
ltype = rtype
|
||||
term = {'nt':op, 't':ltype, 'ch':[term, rexpr]}
|
||||
# Note that although list + nonlist is semantically the same as
|
||||
# list + (list)nonlist and same goes for nonlist + list, they
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue