Subject: bug#14164: letrec: detect illegal accesses to vars before entering body

From: Nikita Karetnikov <[email-masked]>
Date: Tue, 09 Apr 2013 10:37:38 +0400

>> According to the manual [1], this snippet:
>>
>> (letrec ((a 42)
>>          (b (+ a 10)))
>>   (* a b))
>>
>> should return "Error: unbound variable: a."

> The manual doesn't say anything nearly that specific.

Either you missed it or I misunderstood this sentence.  So if you missed
it, it can be found below 'syntax: letrec* bindings body'.

> In general, if the manual says you "may not" do something, or if the
> R5RS says "it is an error", that means that if you do, the results are
> unspecified.

Are you talking about the result of 'letrec' or 'b'?  Anyway, why does
it return 2184 if the results are unspecified?  Could you elaborate?