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]

Re: Help, writing kawa equivalent of java program


On 04/01/2017 09:28 AM, Per Bothner wrote:
On 04/01/2017 08:54 AM, Vasantha Ganesh wrote:

and this Kawa program:

(define-simple-class kittens ()
  (make-interface #t)
  (a::long))

(display kittens:class)

I think both are equivalent, but kawa seems to think that I'm doing a
type cast and throws this error message:

Argument #1 'class kittens' to 'gnu.bytecode.Type.getReflectClass()'
has wrong type (class) (java.lang.Class cannot be cast to
gnu.bytecode.Type)
    at not_working.run(not_working.scm:5)
    at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:317)
    at gnu.expr.CompiledModule.evalModule(CompiledModule.java:42)
    at gnu.expr.CompiledModule.evalModule(CompiledModule.java:61)
    at kawa.Shell.runFile(Shell.java:538)
    at kawa.Shell.runFileOrClass(Shell.java:447)
    at kawa.repl.main(repl.java:881)
Caused by: java.lang.ClassCastException: java.lang.Class cannot be
cast to gnu.bytecode.Type
    ... 7 more

That looks like a bug.  I'll take a look.

I checked in a fix (and a simplified testcase) for this.
--
	--Per Bothner
per@bothner.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]