Uncaught compiler errors in malformed SPECIAL declarations

Bug #1740756 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

There are two distinct uncaught errors in malformed SPECIAL declarations.

(compile nil '(lambda () (declare (special 1))))

==>

The value
  1
is not of type
  (OR CONS SYMBOL)
when binding SB-IMPL::NAME
   [Condition of type TYPE-ERROR]
[...]
Backtrace:
  0: (SB-KERNEL:ASSERT-SYMBOL-HOME-PACKAGE-UNLOCKED 1 "declaring ~A special") [more]
  1: (SB-KERNEL:PROGRAM-ASSERT-SYMBOL-HOME-PACKAGE-UNLOCKED :COMPILE 1 "declaring ~A special")
[...]

and also

(compile nil '(lambda () (declare (special (foo)))))

===>

The value
  (FOO)
is not of type
  SYMBOL
when binding SB-C::NAME
   [Condition of type TYPE-ERROR]
[...]
Backtrace:
  0: (SB-C::FIND-IN-BINDINGS NIL (FOO)) [external]
  1: (SB-C::PROCESS-SPECIAL-DECL (SPECIAL (FOO)) #S(SB-KERNEL:LEXENV :FUNS NIL :VARS NIL :BLOCKS NIL :TAGS NIL :TYPE-RESTRICTIONS NIL :LAMBDA NIL ...) NIL T :COMPILE)
[...]

Stas Boukarev (stassats)
tags: added: malformed-source
Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Patch attached.

Revision history for this message
Douglas Katzman (dougk) wrote :
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.