Ignore:
Timestamp:
May 13, 2009, 5:52:49 PM (12 years ago)
Author:
gz
Message:

Extend the mechanism used to warn about undefined and duplicate functions in a
compilation unit to do the same for types, use it for types defined by
deftype/defstruct/defclass.

Also make proclaim-type err on invalid types and warn about undefined ones.

Tighten up assorted type/ftype declaration checking. This in turn unleashed
a bunch of test suite tests requiring errors on conflicts between DECLARATION
declarations and types, so I put in checks for those as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/macros.lisp

    r11855 r12045  
    19911991                        (setq type-p t))
    19921992                      (setq type (cadr options))
    1993                       ;; complain about illegal typespecs
     1993                      ;; complain about illegal typespecs and continue
    19941994                      (handler-case (specifier-type type env)
    1995                         (invalid-type-specifier ()
     1995                        (program-error ()
    19961996                          (warn "Invalid type ~s in ~s slot definition ~s" type class-name slot))))
    19971997                     (:initform
     
    20452045                                      (length illegal) illegal keyvect))))
    20462046          `(progn
     2047             (when (memq ',class-name *nx-known-declarations*)
     2048               (check-declaration-redefinition ',class-name 'defclass))
    20472049            (eval-when (:compile-toplevel)
    20482050              (%compile-time-defclass ',class-name ,env)
Note: See TracChangeset for help on using the changeset viewer.