Opened 12 years ago

Closed 12 years ago

#641 closed defect (fixed)

DEFSTRUCT (:TYPE) + DEFTYPE results in bogus duplicate-type-definition warning

Reported by: trittweiler Owned by: gb
Priority: normal Milestone:
Component: ANSI CL Compliance Version: 1.4
Keywords: Cc: tcr@…


Straight from CLHS DEFSTRUCT dictionary entry (the description of the :TYPE option):

;; For example:

(defstruct (quux (:type list) :named) x y)

;; should make a constructor that builds a list exactly like the one ;; that list produces, with quux as its car.

;; If this type is defined:

(deftype quux () '(satisfies quux-p))

;; then this form

(typep (make-quux) 'quux)

;; should return precisely what this one does

(typep (list 'quux nil nil) 'quux)

Compiling that, results in

;Compiling "/tmp/foo.lisp"... ;Compiler warnings for "/tmp/foo.lisp" : ; In an anonymous lambda form at position 60: Duplicate definitions of (TYPE QUUX), in this file ; In an anonymous lambda form at position 449: Duplicate definitions of (TYPE FOO), in this file

The Ironclad library makes use of this feature. So it's a real-life annoyance.

Change History (2)

comment:1 Changed 12 years ago by trittweiler

  • Cc tcr@… added
  • Version changed from trunk to 1.4

CL-USER> (lisp-implementation-version) "Version 1.4-RC1-r13031 (LinuxX8632)"

comment:2 Changed 12 years ago by gb

  • Resolution set to fixed
  • Status changed from new to closed

This is fixed in both the trunk (in r13358) and 1.4 (r13359).

Note: See TracTickets for help on using tickets.