Commit 367a7dc
Mark Evenson
DISASSEMBLE type-error on bad argument
CLHS specifies `disassemble`'s argument as an *extended function
designator* — i.e. `(or function symbol (cons (eql setf) (cons
symbol null)))` — and mandates a `TYPE-ERROR` otherwise.
`DISASSEMBLE.ERROR.3` iterates the mini-universe expecting
`TYPE-ERROR` for everything outside that set, but ABCL accepted
arbitrary junk, often crashing inside `disassemble-function`.
Added an explicit `typep` guard that signals `TYPE-ERROR` with
`:datum` and `:expected-type` populated. The accepted type is widened
with `(cons (eql lambda) t)` so that `DISASSEMBLE.3`
(`(disassemble '(lambda (x y) (cons y x)))`, which expects success)
keeps passing.1 parent dead547 commit 367a7dc
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
213 | 221 | | |
214 | 222 | | |
215 | 223 | | |
| |||
0 commit comments