bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #47651] Scope issue calling for-each from a class method


From: Tom Bousso
Subject: [Bug-kawa] [bug #47651] Scope issue calling for-each from a class method
Date: Fri, 08 Apr 2016 21:24:57 +0000
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <http://savannah.gnu.org/bugs/?47651>

                 Summary: Scope issue calling for-each from a class method
                 Project: Kawa
            Submitted by: tbousso
            Submitted on: Fri 08 Apr 2016 09:24:55 PM GMT
                Category: Code generation
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:


(define-simple-class A ()
        ((*init*)
                (for-each
                        (lambda
                                (n)
                                (print n)
                        )
                        '(1 2 3)
                )
        )
        ((print n)
                (format #t "~D" n)
        )
)

(A)


That code results in an error: test.scm:6:5: internal error: missing
LambdaExp:print/5/l:11

It seems like the lambda doesn't capture the object's scope correctly. If I
create my own for-each in Scheme or change it to ((this):print n) then it
works.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47651>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]