I noticed that a test I added yesterday only passes at random.
It's the assertion that (set-dispatch-macro-character c1 c2 '(setf foo))
should not work because the function can't be an
If the compiler compiles the call, it correctly says this won't work:
(funcall (lambda () (set-dispatch-macro-character #\# #\$ '(setf foo))))
Value of '(SETF FOO) in
(SET-DISPATCH-MACRO-CHARACTER #\# #\$ '(SETF FOO))
(OR FUNCTION SYMBOL).
But if you call the function bypassing the compiler:
(funcall (eval ''set-dispatch-macro-character) #\# #\$ '(setf foo)) => T
I did not encounter this problem until now.
set-macro-character and set-dispatch-macro-character are pretty much
adjacent both in 'fndb' and in their source code, but only
set-macro-character's signature is right.
* SB-KERNEL:%SIMPLE-FUN-TYPE #'set-macro-character)
(FUNCTION (CHARACTER (OR FUNCTION SYMBOL) &OPTIONAL T T) (VALUES (MEMBER T)
* (SB-KERNEL:%SIMPLE-FUN-TYPE #'set-dispatch-macro-character)
(FUNCTION (CHARACTER CHARACTER T &OPTIONAL T) (VALUES (MEMBER T) &OPTIONAL))
I've no clue where it got T instead of CALLABLE as the third argument other
than perhaps it gets screwed up due to use of the function in