This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: issue: class field and its usage from lambda
- From: Fushacko Tito <imdagger at yandex dot ru>
- To: Per Bothner <per at bothner dot com>
- Cc: "kawa at sourceware dot org" <kawa at sourceware dot org>
- Date: Wed, 08 Aug 2012 13:12:51 +0400
- Subject: Re: issue: class field and its usage from lambda
- References: <33481344355500@web19g.yandex.ru> <50222A60.50207@bothner.com>
Thanks. It works for me now (for synthetic code and for my real project).
08.08.2012, 12:59, "Per Bothner" <per@bothner.com>:
> On 08/07/2012 09:05 AM, Fushacko Tito wrote:
>
>> (define-class FailClass ()
>> (x ::float access: 'private init: 0.0)
>>
>> ((wrap-x) (lambda () x))
>>
>> ((calculate-position)
>> (letrec ( (wrap-func (lambda () (wrap-x))) )
>> (wrap-func))))
>>
>> For both Kawa 1.12.1 (revision 7282) and Kawa 1.12 release i got this traceback:
>> [imdagger@blacktears]$ java -jar /home/imdagger/kawa/kawa/kawa-1.12.1.jar -C test.scm
>> (compiling test.scm to test)
>> test.scm:4: internal error while compiling test.scm
>> java.lang.NullPointerException
>> at gnu.expr.LambdaExp.setCallersNeedStaticLink(LambdaExp.java:209)
>
> I checked in a fix for this in the Subversion repository.
>
> This is related to using define-class rather than define-simple-class;
> the manual discusses the difference:
> http://www.gnu.org/software/kawa/Defining-new-classes.html
>
> --
> --Per Bothner
> per@bothner.com http://per.bothner.com/
--
Alex Moiseenko