anyValue: Always yield a matrix if any predicate is a matrix

This is a long-standing bug, apparently.  The location of this code makes it
difficult to test directly (that is in dire need of correcting), but
fortunately we have a number of tests in systems that use TAME that
indirectly test this.

The problem manifested when a matrix was already in the store, but then a
scalar or vector predicate was considered.  Without making the branch that
was modified here, it modified store such that it would always yield a
vector.

* src/current/compiler/js.xsl (anyValue): Consider store dimension when
    recursing.
master
Mike Gerwitz 2018-11-21 15:19:44 -05:00
parent 98494edee5
commit 7f3e279cfa
1 changed files with 1 additions and 1 deletions

View File

@ -1568,7 +1568,7 @@
v = returnOrReduceOr( store[ i ], u );
// recurse on vectors
if ( typeof param[ i ] === 'object' )
if ( typeof param[ i ] === 'object' || typeof store[ i ] === 'object' )
{
var r = deepClone( store[ i ] || [] );
if ( typeof r !== 'object' )