when a letrec* binding clause expression is a lambda with a reference

Bug #205427 reported by Derick Eddington
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
High
Abdulaziz Ghuloum

Bug Description

The reference to h1 in (set! f0 (lambda () h1)) is causing h1 to not be assigned the correct value of 'C. The 2nd example, with (set! f0 (lambda () 0)), is correct.

Ikarus Scheme version 0.0.3+ (revision 1421, build 2008-03-22)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

> (letrec* ([f0 (void)]
            [g0 (void)]
            [h0 (void)]
            [dummy (begin
                     (set! f0 (lambda () h1))
                     (set! g0 'B)
                     (set! h0 'C)
                     '#f)]
            [f1 f0]
            [g1 g0]
            [h1 h0])
           (values f1 g1 h1))
#<procedure f0>
B
#<void> ;;; this should be 'C
>
> (letrec* ([f0 (void)]
            [g0 (void)]
            [h0 (void)]
            [dummy (begin
                     (set! f0 (lambda () 0))
                     (set! g0 'B)
                     (set! h0 'C)
                     '#f)]
            [f1 f0]
            [g1 g0]
            [h1 h0])
           (values f1 g1 h1))
#<procedure f0>
B
C
>

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in rev 1424. Thank you!

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → High
status: New → Fix Committed
Changed in ikarus:
milestone: none → 0.0.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.