MARRAYREF: fix an incorrectly constructed MQAPPLY expression
commitf2a5b735d265add02da90a7aae55bdb26f1e9dd1
authorKris Katterjohn <katterjohn@gmail.com>
Sun, 5 Sep 2021 19:40:29 +0000 (5 15:40 -0400)
committerKris Katterjohn <katterjohn@gmail.com>
Sun, 5 Sep 2021 19:40:29 +0000 (5 15:40 -0400)
tree1d0d00f9392ecc1b7a494e5d2c169f16667cc86a
parent0fe0e344815f2e9310c014231f905e9529cd99ed
MARRAYREF: fix an incorrectly constructed MQAPPLY expression

This seems to be a very old Maxima bug (present in 5.0) that was not
in Macsyma.

The incorrect MQAPPLY expression constructed in MARRAYREF included an
AARRAY flag in its header instead of the intended ARRAY flag.

This bug affected various things, such as arrayapply, translated array
references and translated calls to subvar.

(%i1) arrayapply (f (), [1]);
(%o1) f()(1)

(%i2) foo () := 'f () [1]$

(%i3) foo ();
(%o3) 'f()[1]

(%i4) translate (foo)$

(%i5) foo ();
(%o5) 'f()(1)

No problems with the test suite or share test suite.  New tests have
been added to rtest2 and rtest_translator.
src/acall.lisp
tests/rtest2.mac
tests/rtest_translator.mac