Changeset 9238


Ignore:
Timestamp:
05/24/05 13:59:11 (16 years ago)
Author:
piso
Message:

TYPEP: signal errors for invalid type specifiers per ANSI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/typep.lisp

    r9081 r9238  
    22;;;
    33;;; Copyright (C) 2003-2005 Peter Graves
    4 ;;; $Id: typep.lisp,v 1.28 2005-05-06 23:29:34 piso Exp $
     4;;; $Id: typep.lisp,v 1.29 2005-05-24 13:59:11 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    5656(defun %typep (object type)
    5757  (when (atom type)
     58    (when (eq type 'values)
     59      (error 'simple-error
     60             :format-control "The symbol ~S is not valid as a type specifier."
     61             :format-arguments (list type)))
    5862    (unless (and (symbolp type) (get type 'deftype-definition))
    5963      (return-from %typep (simple-typep object type))))
     
    164168            (or (endp i)
    165169                (eql (%car i) (length object)))))
     170      ((FUNCTION VALUES)
     171       (error 'simple-error
     172              :format-control "~S types are not a legal argument to TYPEP: ~S"
     173              :format-arguments (list tp type)))
    166174      (t
    167175       nil))))
Note: See TracChangeset for help on using the changeset viewer.