Commit 839a930d authored by Gail Zacharias's avatar Gail Zacharias
Browse files

Better handling for the case where defn class name is an unknown symbol...

Better handling for the case where defn class name is an unknown symbol (represented by an arglist-dummy object).  Fixes ticket #156.
parent 18899df7
...@@ -1371,7 +1371,7 @@ to the context provided by RAW-FORM." ...@@ -1371,7 +1371,7 @@ to the context provided by RAW-FORM."
(defun object-definition-in-env (env &optional class) (defun object-definition-in-env (env &optional class)
(when-let (defn (cdr (assoc +object-marker+ env))) (when-let (defn (cdr (assoc +object-marker+ env)))
(when (or (null class) (when (or (null class)
(eq (object-defn-classname defn) (safe-class-name class))) (eq (object-defn-classname defn) (class-name-or-dummy class)))
defn))) defn)))
;; Returns the class (name or actual class) and the message-in-progress ;; Returns the class (name or actual class) and the message-in-progress
...@@ -2261,7 +2261,7 @@ datum for subsequent logics to rely on." ...@@ -2261,7 +2261,7 @@ datum for subsequent logics to rely on."
(sequencedp (and defn (sequencedp (and defn
(eq operator 'gendl:the-child) (eq operator 'gendl:the-child)
(sequence-slot-form-p (object-defn-section defn) (object-defn-slot-form defn)))) (sequence-slot-form-p (object-defn-section defn) (object-defn-slot-form defn))))
(class-name (safe-class-name class)) (class-name (class-name-or-dummy class))
(functionp (consp msg)) (functionp (consp msg))
(messages (delete-duplicates (messages (delete-duplicates
(nconc (when (and defn (eq (object-defn-classname defn) class-name)) (nconc (when (and defn (eq (object-defn-classname defn) class-name))
...@@ -2300,7 +2300,7 @@ datum for subsequent logics to rely on." ...@@ -2300,7 +2300,7 @@ datum for subsequent logics to rely on."
(defun gendl-superclasses-in-env (class env) (defun gendl-superclasses-in-env (class env)
(let* ((defn (object-definition-in-env env)) (let* ((defn (object-definition-in-env env))
(class-name (safe-class-name class)) (class-name (class-name-or-dummy class))
(class-defn (and defn (class-defn (and defn
(eq (object-defn-classname defn) class-name) (eq (object-defn-classname defn) class-name)
defn)) defn))
...@@ -2469,6 +2469,9 @@ datum for subsequent logics to rely on." ...@@ -2469,6 +2469,9 @@ datum for subsequent logics to rely on."
(defmethod safe-class-name ((self class)) (class-name self)) (defmethod safe-class-name ((self class)) (class-name self))
(defmethod safe-class-name ((self t)) nil) (defmethod safe-class-name ((self t)) nil)
(defun class-name-or-dummy (self)
(if (arglist-dummy-p self) self (safe-class-name self)))
;; Return the last non-empty tail of plist. ;; Return the last non-empty tail of plist.
(defun plist-tail (plist) (defun plist-tail (plist)
(loop for last = plist then next for next = (cddr last) (loop for last = plist then next for next = (cddr last)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment