From: Fredrik T. <fr...@do...> - 2010-02-11 04:13:30
|
Hi list, Using SLOT-VALUE to access struct slots is supposed to work in SBCL, right? I'm asking because the compiler complains when I try to do things like these: (defstruct test a) (defun weird-test (s) (with-slots (a) s (incf a))) The warning I get is this: [snip] ; (SB-PCL::SET-SLOT-VALUE #:TMP37 'A #:NEW36) ; ; caught STYLE-WARNING: ; undefined function: (SB-PCL::SLOT-ACCESSOR :GLOBAL A SB-PCL::WRITER) [snip] When I compile the same code one more time, however, the warning disappears, so it doesn't seem entirely wrong. It also seems to work if I add (declare (type test s)) to the start of weird-test, and I can understand, of course, why that helps, but should it really be necessary? Am I missing something? Fredrik Tolf |