From 9d40fd46df9f542c2271d939002400aafb0c9c30 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 1 Dec 2008 07:40:08 +0000 Subject: [PATCH] 1.0.22.22: (SETF FIND-CLASSOID) to drop DEFTYPE lambda-lists and source-locations * Going in despite the freeze, as this is a regression of sorts as of 1.0.22.8. * Don't store early source-locations for defined types: use WITH-SOURCE-LOCATION to ensure we convert them to proper source-locations. Thanks to Tobias Ritterweiler for the heads-up. --- src/code/class.lisp | 4 +++- src/compiler/compiler-deftype.lisp | 2 +- tests/deftype.impure.lisp | 8 +++++++- version.lisp-expr | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/code/class.lisp b/src/code/class.lisp index 6639a3a9c..901713e31 100644 --- a/src/code/class.lisp +++ b/src/code/class.lisp @@ -765,7 +765,9 @@ (error "Cannot redefine standard type ~S." name)) (:defined (warn "Redefining DEFTYPE type to be a class: ~S" name) - (setf (info :type :expander name) nil))) + (setf (info :type :expander name) nil + (info :type :lambda-list name) nil + (info :type :source-location name) nil))) (remhash name table) (%note-type-defined name) diff --git a/src/compiler/compiler-deftype.lisp b/src/compiler/compiler-deftype.lisp index f1453c060..6427570e1 100644 --- a/src/compiler/compiler-deftype.lisp +++ b/src/compiler/compiler-deftype.lisp @@ -43,7 +43,7 @@ (setf (info :type :kind name) :defined))) (setf (info :type :expander name) expander (info :type :lambda-list name) lambda-list) - (when source-location + (sb!c:with-source-location (source-location) (setf (info :type :source-location name) source-location)) (when doc (setf (fdocumentation name 'type) doc)) diff --git a/tests/deftype.impure.lisp b/tests/deftype.impure.lisp index b11b982a2..ee43d3bc5 100644 --- a/tests/deftype.impure.lisp +++ b/tests/deftype.impure.lisp @@ -37,4 +37,10 @@ (defstruct foo) (assert (progn (deftype foo () 'integer) (null (find-class 'foo nil)) - t)) \ No newline at end of file + t)) + +;; Ensure that DEFCLASS after DEFTYPE nukes the lambda-list. +(deftype bar (x) `(integer ,x)) +(assert (equal '(x) (sb-int:info :type :lambda-list 'bar))) +(defclass bar () ()) +(assert (not (sb-int:info :type :lambda-list 'bar))) diff --git a/version.lisp-expr b/version.lisp-expr index 9a4b1cc4d..a864fd626 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.22.21" +"1.0.22.22" -- 2.11.4.GIT