Strange error in CLISP
Posted: Fri Jan 23, 2009 9:16 am
I'm running the following code in CLISP:
When running #'test without compiling it first, the error is (obviously): There are not enough arguments left for this format directive.
After compiling, the error is somehow lost and I get this strange message: APPLY: too few arguments given to #<COMPILED-FUNCTION TEST-1>
Also, evaluating (test 1) breaks into the debugger with the message: EVAL: too many arguments given to TEST: #1=(TEST 1)
So it seems impossible to call this function because any number of parameters will be wrong.
I've run this test on Windows with and without SLIME and using SBCL too. Only CLISP has this problem. I find this behavior annoying because I'm losing the useful error message. Is this a bug or am I doing something stupid ?
Code: Select all
(defun test ()
(format t "~A"))
(compile 'test) ;; this is required to reproduce the error
(test)
After compiling, the error is somehow lost and I get this strange message: APPLY: too few arguments given to #<COMPILED-FUNCTION TEST-1>
Also, evaluating (test 1) breaks into the debugger with the message: EVAL: too many arguments given to TEST: #1=(TEST 1)
So it seems impossible to call this function because any number of parameters will be wrong.
I've run this test on Windows with and without SLIME and using SBCL too. Only CLISP has this problem. I find this behavior annoying because I'm losing the useful error message. Is this a bug or am I doing something stupid ?
