GNU bug report logs - #42757
calling internal define with incorrect n(args) gives invalid error

Previous Next

Package: guile;

Reported by: Christopher Lam <christopher.lck <at> gmail.com>

Date: Sat, 8 Aug 2020 07:00:02 UTC

Severity: normal

Merged with 42345

Found in version 3.0.4

Full log


View this message in rfc822 format

From: Christopher Lam <christopher.lck <at> gmail.com>
To: 42757 <at> debbugs.gnu.org
Subject: bug#42757: calling internal define with incorrect n(args) gives invalid error
Date: Sat, 8 Aug 2020 06:58:53 +0000
[Message part 1 (text/plain, inline)]
Using guile 3.0.1 (also tested with 3.0.4)

Consider following snippet
------
(define (outer-function)
  (define (inner-function q w e r t y)  ;takes 6 args
    #f)
  (inner-function 'a 'b 'c 'd 'e))     ;send 5 args
(outer-function)
------

The internally defined function is called with insufficient args. We'd
expect error to be
"Wrong number of arguments to inner-function"

Instead the error is
"Wrong number of arguments to a"

Note if the invalid code is not internally-defined, the error is correct:
"Wrong number of arguments to #<procedure inner-function (q w e r t y)>"
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.