This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Creating closures in methods
- From: "Kjetil S. Matheussen" <k dot s dot matheussen at notam02 dot no>
- To: kawa at sources dot redhat dot com
- Date: Fri, 02 Feb 2007 00:15:51 +0100 (CET)
- Subject: Creating closures in methods
Is the following supposed to work?
"
(define (external-func func)
#f)
(define-simple-class <test> ()
(var 50)
((*init*)
(external-func (lambda ()
var))))
(define test (<test>))
"
Because it doesn't for me. I couldn't find anything in the documentation
about this either.
Error is:
"
java.lang.VerifyError: (class: test, method: <init> signature: ()V)
Expecting to find object/array on stack
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getDeclaredMethods(Class.java:1763)
"