Changeset 11630


Ignore:
Timestamp:
Jan 20, 2009, 9:56:08 PM (11 years ago)
Author:
gb
Message:

If THE is going to typecheck via TYPEP, map hairy FUNCTION types to
the simple FUNCTION type. (Probably the best we can do.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/nx1.lisp

    r11586 r11630  
    2424    (setq typespec t))
    2525  ;; Allow VALUES types here (or user-defined types that
    26   ;; expand to VALUES types).
     26  ;; expand to VALUES types).  We could do a better job
     27  ;; of this, but treat them as wild types.
     28  ;; Likewise, complex FUNCTION types can be legally used
     29  ;; in type declarations, but aren't legal args to TYPEP;
     30  ;; treat them as the simple FUNCTION type.
    2731  (let* ((ctype (values-specifier-type typespec)))
    28     (if (typep ctype 'values-ctype)
     32    (if (typep ctype 'values-ctype)       
    2933      (setq typespec '*)
    30       (setq typespec (nx-target-type (type-specifier ctype)))))
     34      (if (typep ctype 'function-ctype)
     35        (setq typespec 'function)       ; better than nothing.
     36        (setq typespec (nx-target-type (type-specifier ctype))))))
    3137  (let* ((*nx-form-type* typespec)
    3238         (transformed (nx-transform form env)))
Note: See TracChangeset for help on using the changeset viewer.