From: Antonio Leitao

Subject: Bug in macrolet?

Date: 1999-7-5 4:40

Hi,

I found a little problem in Allegro CL 5.0 (Linux) with interpreted
code.

In the following definition,

(defun foo (x)
  (macrolet ((bar ()
	       x))
    (+ x (bar))))

the macrolet form is accessing a variable x which is not accessible at
the time of the macro expansion.

If I compile the file containing the above definition, I get an error
during macroexpansion, as expected.  What is not expected is that when
I run the same example interpreted, I can call foo.

(foo 1) -> 2

I checked the same example in CMUCL and it implements the expected
behaviour (but, if I'm not mistaken, in CMUCL the code never runs
interpreted).

Thanks,

Antonio