- changed status to resolved
letrec, letrec* and internal definition should raise an error if init part contains undefined variable
Issue #127
resolved
The following script should all be invalid syntax
#!r6rs
(import (rnrs))
(define (foo bar)
(define bar (cons 'a bar))
(display bar) (newline))
(define (foo2 bar)
(letrec ((bar (cons 'a bar)))
(display bar) (newline)))
(define (foo3 bar)
(letrec* ((bar (cons 'a bar)))
(display bar) (newline)))
(foo 'b)
(foo2 'b)
(foo3 'b)
But all print (a)
.
NOTE: this may cause SEGV.
Comments (1)
-
reporter - Log in to comment
Adding uninitialised variable check on letrec & letrec*. (Fixes
#127)→ <<cset 428c5077033c>>