bug#42345: 3.0.4 says "wrong num' of arg's to 1" vs 2.2.4: "wrong num' of arg's to baz"

Matt Wette <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
In Guile 3.0.4, the program below results in the error:

/home/mwette/zz.scm:5:2: In procedure bar:
Wrong number of arguments to 1


In Guile 2.2.4, the same program results in the error:

;;; /home/mwette/zz.scm:11:14: warning: wrong number of arguments to `bar'
;;; compiled 
/home/mwette/.cache/guile/ccache/2.2-LE-8-3.A/home/mwette/zz.scm.go


However, once compiled, Guile 3.0.4, will repeat the same error message,
while Guile 2.2.4, will not report any error.

I consider reporting "1" as the name of a procedure a bug.

Here is the program:
(define (foo)

   (define (bar a b)
     (+ a b))

   (define (baz)
     (let* ((a 1)
        (b 2)
        (r (bar a b a)))
       r))

   (baz))

(foo)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.