clasp
clasp copied to clipboard
(SETF AREF) does no type checking
(let ((a (make-string 1 :element-type 'base-char)))
(setf (aref a 0) #\u421)
a)
gives "!"
I can (and will, I guess) write a compiler macro to handle it in inline.lisp, but the underlying function will need something too, unless we want to redefine it in lisp.
Edit: Or just define a setf expansion instead of having a function.
This is basically due to various from_object methods not doing enough checks. Sometimes integer ranges are done as asserts and stuff...