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]

compilation error: throwing exceptions inside define-simple-class


Hi,

kawa failed to compile throw exception statement inside define-simple-class:

bash-2.05a$ cat Test.scm
(define-simple-class Test1 ()
 ((test) :: <String>
  (primitive-throw (make <java.lang.Exception> '|test|))
  )
 )
bash-2.05a$ kawa -C Test.scm
(compiling Test.scm)
java.lang.ArrayIndexOutOfBoundsException: -1
   at gnu.bytecode.CodeAttr.topType(CodeAttr.java:217)
   at gnu.expr.StackTarget.compileFromStack0(StackTarget.java:53)
   at gnu.expr.StackTarget.compileFromStack0(StackTarget.java:24)
   at gnu.expr.StackTarget.compileFromStack(StackTarget.java:68)
   at gnu.kawa.functions.Convert.compile(Convert.java:43)
   at gnu.expr.ApplyExp.compile(ApplyExp.java:157)
   at gnu.expr.ApplyExp.compile(ApplyExp.java:107)
   at gnu.expr.Expression.compileWithPosition(Expression.java:72)
   at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1348)
   at gnu.expr.ClassExp.compile(ClassExp.java:375)
   at gnu.expr.ClassInitializer.<init>(ClassInitializer.java:16)
   at gnu.expr.ClassExp.compileSetField(ClassExp.java:529)
   at gnu.expr.SetExp.compile(SetExp.java:151)
   at gnu.expr.Expression.compileNotePosition(Expression.java:82)
   at gnu.expr.Expression.compileWithPosition(Expression.java:69)
   at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1348)
   at gnu.expr.Compilation.addClass(Compilation.java:1499)
   at gnu.expr.Compilation.compile(Compilation.java:791)
   at gnu.expr.Compilation.compileToFiles(Compilation.java:838)
   at kawa.lang.CompileFile.compile_to_files(CompileFile.java:92)
   at kawa.repl.processArgs(repl.java:390)
   at kawa.repl.main(repl.java:594)
bash-2.05a$


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