Subject: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault

From: Stefan Monnier <[email-masked]>
Date: Tue, 10 Aug 2010 10:27:19 +0200

> (functionp #[abc])
> ⇒ t

> (funcall #[abc])
> ⇒ Debugger entered--Lisp error: (invalid-function #[abc])

> Shouldn't anything that satisfies functionp be a valid argument to funcall?

Yes and no.  Should (lambda 3) be accepted by functionp?  What about
(lambda () . 3) ?  What about (lambda () (+ . 1)) and other errors?

#[abc] is an object of "function type", which is why functionp
returns t.  I don't think that it's terribly important if when calling
it, you get an error, since that can happen for syntactically valid
functions as well.

        Stefan