chiark / gitweb /
src/class-make-impl.lisp: Attach initargs in the correct order.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 3 Aug 2019 14:53:21 +0000 (15:53 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 3 Aug 2019 15:46:21 +0000 (16:46 +0100)
This is important for selecting the right slot initarg.

src/class-make-impl.lisp

index 4785d9c603531ac489bc60c61e3ae3e168fe9f38..b96d830cb60eedd4047cc61a7a87f98d971f7be7 100644 (file)
@@ -183,11 +183,15 @@ (defmethod make-sod-slot-initarg-using-slot
     ((class sod-class) name (slot sod-slot) pset &key location)
   (with-slots (initargs) class
     (with-slots ((type %type)) slot
-      (push (make-instance (get-property pset :initarg-class :symbol
-                                        'sod-slot-initarg)
-                          :location (file-location location)
-                          :class class :name name :type type :slot slot)
-           initargs))))
+      (setf initargs
+           (append initargs
+                   (cons (make-instance (get-property pset :initarg-class
+                                                      :symbol
+                                                      'sod-slot-initarg)
+                                        :location (file-location location)
+                                        :class class :name name
+                                        :type type :slot slot)
+                         nil))))))
 
 (defmethod sod-initarg-default ((initarg sod-initarg)) nil)