Closed marcomaggi closed 12 years ago
Fixed in the HEAD of the assembler branch, by adding a compiler pass. The fix is not R6RS compatible. R6RS mandates that illegal references to bindings established by LETREC and LETREC* are detected at run time and cause an assertion violation to be raised. Vicare detects them at compile time, so some fully R6RS-compliant code will not work under Vicare.
For example, the following program (from Flatt's test suite) will run under a R6RS-compliant implementation:
(import (rnrs))
(letrec ((x (if (eq? (cons 1 2)
(cons 1 2))
x
1)))
x)
because the form X in reference position in the right-hand side of the binding is never evaluated; under Vicare this code will rather raise an assertion violation and syntax violation at compile time.
The following test should succeed because the LETREC form is wrong:
Matches bug 216832 at the Ikarus bug tracker.