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

difficult to reproduce


(let* ((is-equal eqv?)
       (false
	(lambda ()
	  (is-equal 'bar 'foo)))
       (foo (lambda () 'foo)))
  (lambda ()
    (foo)))

This code for no apparent reason throws

java.lang.NullPointerException: 
	at gnu.bytecode.CodeAttr.emitGetField(CodeAttr.java:861)
	at gnu.expr.LambdaExp.enterFunction(LambdaExp.java, Compiled Code)
	at gnu.expr.Compilation.addClass(Compilation.java, Compiled Code)
	at gnu.expr.LambdaExp.compile(LambdaExp.java:431)
	at gnu.expr.LambdaExp.compileAlloc(LambdaExp.java:445)
	at gnu.expr.LambdaExp.compile(LambdaExp.java, Compiled Code)
	at gnu.expr.Expression.compileNotePosition(Expression.java, Compiled Code)
	at gnu.expr.Expression.compileWithPosition(Expression.java, Compiled Code)
	at gnu.expr.LetExp.compile(LetExp.java, Compiled Code)
	at gnu.expr.Expression.compileWithPosition(Expression.java, Compiled Code)
	at gnu.expr.LetExp.compile(LetExp.java, Compiled Code)
	at gnu.expr.Expression.compileWithPosition(Expression.java, Compiled Code)
	at gnu.expr.LetExp.compile(LetExp.java, Compiled Code)
	at gnu.expr.Expression.compileNotePosition(Expression.java, Compiled Code)
	at gnu.expr.Expression.compileWithPosition(Expression.java, Compiled Code)
	at gnu.expr.Compilation.addClass(Compilation.java, Compiled Code)
	at gnu.expr.Compilation.<init>(Compilation.java:562)
	at gnu.expr.LambdaExp.eval(LambdaExp.java, Compiled Code)
	at gnu.expr.ModuleExp.evalModule(ModuleExp.java:32)
	at kawa.Shell.run(Shell.java, Compiled Code)
	at kawa.Shell.run(Shell.java:31)
	at kawa.Shell.run(Shell.java:18)
	at kawa.repl.main(repl.java, Compiled Code)

It seems to me a little bit confusing because even if the four
functions are not interdependent (only in couple), if I try, as far as
I know, to simplify the form I can't reproduce the error.

You get the same exception sobstituting letrec to let* and, for
instance, cons to eqv?.


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