Closed jpellegrini closed 3 years ago
And it seems that not only call/cc
, but syntax-rules
too, fails in the same way: try ((syntax-rules -1))
.
Thanks for letting me know! I'll take a look this week
Argument length check was just broken in general, an easy example is ((lambda (x) x))
. The reason was that the bytecode instruction that checks argument count is always the first in a function body, and the first instruction was always skipped due to the program counter being incremented as part of the main loop, even if it was just set to 0 to enter a new function.
Looks like this issue was introduced in commit cc897c89acd18c6811179c8cf6c717a8aeaa0260.
Should be resolved in 4040cc143cff03537d17480e5f169ad5943a25ef, added test cases for all examples discussed in this thread.
Yay! :fireworks:
call/cc
works when called properly:But it seems that some argument check is missing: