Ticket #926 (closed enhancement: fixed)
Some users have difficulty understanding the error that occurs when declarations are encountered in contexts where they aren't allowed
| Reported by: | fare | Owned by: | gb |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Compiler | Version: | trunk |
| Keywords: | Cc: |
Description (last modified by gb) (diff)
Dan Weinreb 2009-01-05 13:49:46 EST
(defun foo (a) (declare (fixnum a)) (+ a a))
works fine.
(defmacro bad () '(declare (fixnum a))) (defun foo (a) (bad) (+ a a))
gets a compile-time error, because macros are not allowed to expand into declarations.
However, the text of the error message is:
DECLARE not expected in (DECLARE (FIXNUM A)).
That's pretty unclear.
[NB: was ITA bug 52936]
Change History
Note: See
TracTickets for help on using
tickets.
