This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: java.lang.VerifyError for keyword with type


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/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]