This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: case-lambda and Java
On 12/08/2009 09:10 AM, Jamison Hope wrote:
On Dec 7, 2009, at 7:02 PM, Per Bothner wrote:
(define-constant ->list :: procedure
(case-lambda ...))
Then $Mn$Grlist will have type gnu.mapping.Procedure, which
means you can use Procedure's various apply* methods.
I just fixed a bug where define-constant would cause the
generated field to have the FINAL property - even when it
is assigned to in the "run" method (as in this case, unless
you're compiling with --module-static-run). Surprised this
wasn't caught earlier ...
When I define ->list like this:
(define-constant ->list :: procedure
(case-lambda ...))
then javap does report $Mn$Grlist as a Procedure
public static final gnu.mapping.Procedure $Mn$Grlist;
but I can't actually use it. In Scheme, if I attempt to compile a file
which does nothing but
(require collections_utils)
-- I'm not even trying to invoke the function yet -- I get a compilation
error:
$ java kawa.repl --target 1.5 --module-static-run
--warn-undefined-variable --main -C usage1.scm
(compiling usage1.scm to usage1)
internal error while compiling usage1.scm
java.lang.ExceptionInInitializerError
Hm. I'm not seeing this. Perhaps you double-check,and then resend
the files (as attachments) and instructions and I can take a look.
--
--Per Bothner
per@bothner.com http://per.bothner.com/