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

Bug #1639490 reported by 3b on 2016-11-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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 "" x8664 linux and "" x8664 windows

Stas Boukarev (stassats) wrote :

In 78a65c2116de287f945bfa65eca5fdd2908e4bda

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats) on 2016-11-30
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers