Edi Weitz <edi@...> writes:
> Suppose I have this in a Lisp source file:
> (defun foo (x y)
> (+ x y))
> (defun bar (x)
> (foo x))
> If in SLIME I press C-c C-c (slime-compile-defun) for the first and
> then for the second definition, I don't get any warnings. Is that on
> purpose? Wouldn't it be nice if SBCL warned about the wrong number of
> arguments for FOO in BAR's definition like, say, LispWorks does?
I don't know. On the one hand, this is usually a programmer error.
On the other hand, it is explicitly not an error until BAR is called,
and even then only if BAR has not been redefined in the meantime.
If, instead of doing C-c C-c or entering individual forms at the repl,
you compiled the file containing your two forms (as you say you have a
file), then SBCL will give you the warning, as under those
circumstances SBCL is allowed to assume that the call to FOO within
BAR always refers to the FOO defined in the same file (see CLHS