This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: java.lang.VerifyError for keyword with type
- From: Per Bothner <per at bothner dot com>
- To: Vladimir Tsichevski <wowa at jet dot msk dot su>
- Cc: Chris Dean <Chris dot Dean at sokitomi dot com>, Kawa List <kawa at sources dot redhat dot com>
- Date: Tue, 08 Apr 2003 22:48:50 -0700
- Subject: Re: java.lang.VerifyError for keyword with type
- References: <28436.1049763678@mercedsystems.com> <3E927E9E.2040608@jet.msk.su>
Vladimir Tsichevski wrote:
so, as you may see, the default value is passed to
Keyword.searchForKeyword, and it
must be Java object, not a Java primitive. The keyword arguments are
passed as Object[], so all values are passed
also as Java objects.
So, until this bug is patched, use the following variant:
(define (proc-with-keywords1 x #!key y)
(let((y :: <int> (or y 1)))
(list x y)))
Right. It would be nice it kawa could concert:
(define (proc-with-keywords x #!key (y :: <int> 1))
to
(define (proc-with-keywords x #!key (y_tmp #!null))
(let ((y :: <int> (if (eq? y_tmp #!null) 1 y_tmp)))
(This still isn't quite right, since it doesn't handle
possible overloading, but there is only partial overloading
support anyway.)
However, I don't think this is important enough for me
to work on at this time.
--
--Per Bothner
per at bothner dot com http://per.bothner.com/