This is the mail archive of the kawa@sourceware.org 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]

import-class vs. module-static-run


I'm now getting this error during compilation (whereas I didn't before, as of… not too long ago -- sorry I can't be more specific):
"evaluating syntax transformer 'import-class' threw java.lang.ClassCastException: don't know how to coerce gnu.mapping.Values to java.lang.Class"


I'm using the import-class macro as it exists in testsuite/ classes1.scm. It appears that this no longer works with --module- static-run.

A simplified test:

$ cat foo.scm
(define-syntax (import-class form)
(syntax-case form ()
((_ fqcn)
(let* ((cls :: java.lang.Class (eval (syntax fqcn)))
(name (string->symbol (java.lang.Class:getSimpleName cls))))
#`(define-alias ,(datum->syntax-object form name) fqcn)))))


(import-class java.io.File)

$ java kawa.repl -C foo.scm
(compiling foo.scm to foo)

$ java kawa.repl --module-static-run -C foo.scm
(compiling foo.scm)
foo.scm:8:1: evaluating syntax transformer 'import-class' threw java.lang.ClassCastException: don't know how to coerce gnu.mapping.Values to java.lang.Class



I could just not do --module-static-run, of course, but I think I had a reason for using it. Plus it used to work.


Ideas?

Thanks,
Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com




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