Hi Jürgen,

Thank you for the fix and the elaborate explanation.

Best Regards
Hans-Peter

On 15/06/2026 14:16, Dr. Jürgen Sauermann wrote:
Hi Hans-Peter,

thanks for reporting both issues.

Fixed in *SVN 2010.*

Issue 1 — ∊⊂'' assertion failure (PrimitiveFunction.cc:467):
The assertion Assert(len_Z) incorrectly assumed the enlist count can never
be 0.  But ⊂'' is a scalar (one element) containing an empty character
vector, so get_enlist_count() legitimately returns 0 — the vector is empty, so there are no simple scalars to collect.  The fix recurses into the first enclosed value to determine the prototype and returns the appropriate empty
result, consistent with how ∊'' already behaves.

Issue 2 — ⍎')SAVE' warning:
The warning is formally correct: ⍎ pushes its own )SI entry, so the )SI
stack is technically not clean when )SAVE is called from inside ⍎.
However, the warning is confusing when the workspace itself is clean and
the user typed ⍎')SAVE' at the top level.  The fix suppresses the warning
when the )SI stack has exactly one entry that is not a defined function
(i.e. only the ⍎ execution context is present).  A suspended defined
function still triggers the warning as before.

Best Regards,
Jürgen

PS: The diagnosis and fix for these bugs were produced with the assistance
of Claude Code (an AI coding assistant by Anthropic). The fix was reviewed
and approved by me before committing. See:
http://svn.savannah.gnu.org/viewvc/apl?view=revision&root=apl&revision=2010



On 6/10/26 17:23, Hans-Peter Sorge wrote:
Hi,

still in

GNU APL version 2.0 / SVN: 1977:2009M
     ∊⊂''

==============================================================================
Assertion failed: len_Z
in Function:      do_eval_B
in file:          PrimitiveFunction.cc:467

C/C++ call stack:
*** useless apl.lines (no CXXFLAGS=-rdynamic -gdwarf-2)


as well as

GNU APL version 2.0 / SVN: 1977:2009M
     )WSID NONE
WAS CLEAR WS
     )SAVE
2026-06-10  17:20:53 (GMT+2)  NONE
     ⍎ ')SAVE'
WARNING: )SAVEing a workspace whose )SI stack is not clear.
2026-06-10  17:21:05 (GMT+2)  NONE


Best Regards
Hans-Peter




Reply via email to