Somewhat confusing exception message with append

  • Open
  • quality assurance status badge
Details
One participant
  • Tomas Nordin
Owner
unassigned
Submitted by
Tomas Nordin
Severity
normal

Debbugs page

Tomas Nordin wrote 2 months ago
(address . bug-guile@gnu.org)
87r04pk9q3.fsf@posteo.net
Hello Guile!

As expected, the following raises an exception:

(append 'a '(b) '()) =>
ice-9/boot-9.scm:1676:22: In procedure raise-exception:
In procedure append: Wrong type argument in position 1 (expecting empty list): a

And so does this:

(append '(a) 'b '()) =>
ice-9/boot-9.scm:1676:22: In procedure raise-exception:
In procedure append: Wrong type argument in position 1 (expecting empty list): b

Note that the a-thing is the first and the b-thing the second argument
in both calls. 'a is at fault in the first and 'b is at fault in the
second call.

But, in both cases the faulty argument is reported to be in position 1.
I would expect maybe position 2 to be complained about from the second
call.

Also, I wonder why we are "(expecting empty list)" in place of the
non-list things?

I made the above observations, if it's a bug or not, I don't know.

(version) => "3.0.9.140-d8df3-dirty"

Have a great Sunday
--
Tomas
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75860@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75860
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help