X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fearly-type.lisp;fp=src%2Fcode%2Fearly-type.lisp;h=f3db7a3dd61baf68bb3261aa1437c3ba3b0f2a43;hb=0c3bbfaa2286626a2d915c8810f690aefc702661;hp=de364ebc6c3c8c884b54bf77827ab548fb229db9;hpb=979539d20a27f4315db9e1bde0a4413135cf8603;p=sbcl.git diff --git a/src/code/early-type.lisp b/src/code/early-type.lisp index de364eb..f3db7a3 100644 --- a/src/code/early-type.lisp +++ b/src/code/early-type.lisp @@ -595,10 +595,9 @@ (when (and (atom spec) (member spec '(and or not member eql satisfies values))) (error "The symbol ~S is not valid as a type specifier." spec)) - (let* ((lspec (if (atom spec) (list spec) spec)) - (fun (info :type :translator (car lspec)))) + (let ((fun (info :type :translator (if (consp spec) (car spec) spec)))) (cond (fun - (funcall fun lspec)) + (funcall fun (if (atom spec) (list spec) spec))) ((or (and (consp spec) (symbolp (car spec)) (not (info :type :builtin (car spec)))) (and (symbolp spec) (not (info :type :builtin spec)))) @@ -652,7 +651,7 @@ expansion happened." ;; b) so (EQUAL (TYPEXPAND 'STRING) (TYPEXPAND-ALL 'STRING)) (values nil nil)) ((symbolp spec) - (values (info :type :expander spec) (list spec))) + (values (info :type :expander spec) spec)) ((and (consp spec) (symbolp (car spec)) (info :type :builtin (car spec))) ;; see above (values nil nil)) @@ -660,7 +659,10 @@ expansion happened." (values (info :type :expander (car spec)) spec)) (t nil))) (if expander - (values (funcall expander lspec) t) + (values (funcall expander (if (symbolp lspec) + (list lspec) + lspec)) + t) (values type-specifier nil)))) (defun typexpand (type-specifier &optional env)