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:
Sei Lisa 2015-09-04 05:56:05 +02:00
parent aa74e6ed64
commit d8649deebd
2 changed files with 3 additions and 3 deletions

View file

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