This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Ateempt to rewrite a example from bytecode package on scheme
- From: Per Bothner <per at bothner dot com>
- To: Yaroslav Kavenchuk <kavenchuk at gmail dot com>
- Cc: kawa at sourceware dot org
- Date: Wed, 19 Nov 2008 00:08:54 -0800
- Subject: Re: Ateempt to rewrite a example from bytecode package on scheme
- References: <49217B73.3000006@gmail.com>
Yaroslav Kavenchuk wrote:
Example is attached
I get error at code
(*:getMethod helloWorldClass "add" argTypes)
Argument #3 ([Ljava.lang.Class;@54c4ad) to
'java.lang.Class.getMethod(java.lang.String,java.lang.Class[])' has
...
What is wrong? How to resolve problem?
The main problem was varargs handling. I think I fixed it so
that is much better now (in SVN trunk).
A minor bug is that you used null instead of #!null.
A trickier issues is since the add method takes Java int
values, you need to pass java.lang.Integer values to
the Method:invoke call: That method knows to "unbox"
java.lang.Integer to int, but it doesn't handle
Scheme integers (which are gnu.math.IntNum).
I think this might be useful as both an example and
a test case. Can I use it as such, including checking
it into the testsuite?
--
--Per Bothner
per@bothner.com http://per.bothner.com/