chiark / gitweb /
src/*.lisp: Fix declared slot types.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 13:27:39 +0000 (14:27 +0100)
SBCL doesn't seem too bothered about type mismatches in slot values, but
CMUCL kicks up a fuss.  These declared types were too strict, either
because of inadequate thinking or because the declarations had become
stale.

src/c-types-parse.lisp
src/class-layout-proto.lisp
src/classes.lisp
src/module-impl.lisp
src/parser/streams-impl.lisp

index 53fc8118c1f7cfb38a3cf93e4b237b4f527a349b..0a6b5abadc48da5bbf7ae4b08ed16f725944d344 100644 (file)
@@ -70,7 +70,7 @@ (defclass declspec ()
   ;; accessor functions later.
   ((label :type keyword :initarg :label :reader ds-label)
    (name :type string :initarg :name :reader ds-name)
-   (kind :type (member type sign size qualifier)
+   (kind :type (member type complexity sign size qualifier)
         :initarg :kind :reader ds-kind)
    (taggedp :type boolean :initarg :taggedp
            :initform nil :reader ds-taggedp))
index 0803b1842a6162d051a7db98dc059179b7aa259a..d34bf8b143dd11805281ff08ad31747d353f5b1b 100644 (file)
@@ -31,7 +31,7 @@ (cl:in-package #:sod)
 (export '(effective-slot effective-slot-class
          effective-slot-direct-slot effective-slot-initializer))
 (defclass effective-slot ()
-  ((%class :initarg :class :type sod-slot :reader effective-slot-class)
+  ((%class :initarg :class :type sod-class :reader effective-slot-class)
    (slot :initarg :slot :type sod-slot :reader effective-slot-direct-slot)
    (initializer :initarg :initializer :type (or sod-initializer null)
                :reader effective-slot-initializer))
index 118b09b770aac09b2458db758529497caa8d5051..da18f5a3c44b16c14dbcba4c62c981b8b4faf35d 100644 (file)
@@ -88,7 +88,7 @@ (defclass sod-class ()
    (effective-methods :type list :reader sod-class-effective-methods)
    (vtables :type list :reader sod-class-vtables)
 
-   (state :initform nil :type (member nil :finalized broken)
+   (state :initform nil :type (member nil :finalized :broken)
          :reader sod-class-state))
   (:documentation
    "Classes describe the layout and behaviour of objects.
index 206b5e65a688241ffe77275c4e5eb4e960926057..ba0439774109d8e2d9e7c327c00f27af48473356 100644 (file)
@@ -199,7 +199,8 @@ (defmethod make-load-form ((fragment c-fragment) &optional environment)
 (export '(code-fragment-item code-fragment code-fragment-reason
          code-fragment-name code-fragment-constraints))
 (defclass code-fragment-item ()
-  ((fragment :initarg :fragment :type c-fragment :reader code-fragment)
+  ((fragment :initarg :fragment :type (or string c-fragment)
+            :reader code-fragment)
    (reason :initarg :reason :type keyword :reader code-fragment-reason)
    (name :initarg :name :type t :reader code-fragment-name)
    (constraints :initarg :constraints :type list
index 33015a0b648abcfa32229fa2ffbc0e79e398d39a..378f9a80d1c0d45a8847731e38c8106d9ef463d1 100644 (file)
@@ -214,7 +214,7 @@ (export '(position-aware-stream
          position-aware-stream-line position-aware-stream-column))
 (defclass position-aware-stream (proxy-stream)
   ((file :initarg :file :initform nil
-        :type pathname :accessor position-aware-stream-file)
+        :type (or pathname null) :accessor position-aware-stream-file)
    (line :initarg :line :initform 1
         :type fixnum :accessor position-aware-stream-line)
    (column :initarg :column :initform 0