Wrong keyword arguments in the backtrace

Bug #726774 reported by Stas Boukarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Low
Unassigned

Bug Description

(funcall (lambda (&key (x 10)) (declare (optimize debug)) (break) x))
shows
((LAMBDA (&KEY (X 10))) :X 10)
, while i didn't provide :x 10, it's correct.

(funcall (lambda (&key (x #'+)) (declare (optimize debug)) (break) x))
has
((LAMBDA (&KEY (X (FUNCTION +)))) :X NIL)
:X NIL is clearly wrong.

Tags: backtrace
Stas Boukarev (stassats)
Changed in sbcl:
importance: Undecided → Low
Revision history for this message
Stas Boukarev (stassats) wrote :

This is because "hairy" (non-constant) default parameters are discarded so that they're not evaluated twice: http://git.boinkor.net/gitweb/sbcl.git/blob/HEAD:/src/compiler/ir1tran-lambda.lisp#l704

Stas Boukarev (stassats)
tags: added: backtrace
Changed in sbcl:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.