Y-OR-N-P and YES-OR-NO-P only accept STRING for format control

Bug #1639490 reported by 3b
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

per http://www.lispworks.com/documentation/HyperSpec/Body/f_y_or_n.htm and http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#format_control Y-OR-N-P and YES-OR-NO-P should accept a "format control" for first argument, which is either a string or function. Description also suggests NIL is a valid input. SBCL only accepts STRING.

test case:

(lambda () (y-or-n-p NIL))
; in: LAMBDA ()
; (Y-OR-N-P NIL)
;
; caught WARNING:
; Constant NIL conflicts with its asserted type STRING.
; See also:
; The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
; caught 1 WARNING condition
#<FUNCTION (LAMBDA ()) {102AFE005B}>

(funcall *)

debugger invoked on a SIMPLE-TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {1003964623}>:
  Value of NIL in (Y-OR-N-P NIL) is NIL, not a STRING.

;; expected waiting for y or n

(just calling y-or-n-p at repl doesn't trigger problem)

tested on "1.3.1.249-7467960" x8664 linux and "1.3.10.66-58829d6" x8664 windows

Revision history for this message
Stas Boukarev (stassats) wrote :

In 78a65c2116de287f945bfa65eca5fdd2908e4bda

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
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.