On Wed, Oct 23, 2024 at 7:56 AM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
I'm sorry I didn't notice this before the release (this is with 2024c):
Condensed version of the failing code posted by Sven:
<hansl>
function void checklist_bad (const list L, const series b)
varlist # what series are defined?
list all = L b
end function
open denmark
list outs = IBO IDE
checklist_bad(outs, IDE)
</hansl>
The error message is: "'b': no such object". The call to
"varlist"
(which I inserted) reveals that the only series "visible" inside
checklist() are const and L.IBO -- L.IDE and b (which refer to the
same series) have disappeared. This is now fixed in git.
The trouble had to do with the treatment of "const" series as function
arguments: instead of being copied they just have their "stack_level"
(which is 0 at the main level of execution) temporarily incremented so
that they're visible inside the function. In this case the stack_level
for IDE got incremented twice, once in its role as a list member then
again as a "const series" argument. So its level ended up as 2 when it
should have been 1. We now take care to prevent such
double-incrementing.
Allin