bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #13854] Using EVAL and #!key


From: Dean Ferreyra
Subject: [Bug-kawa] [bug #13854] Using EVAL and #!key
Date: Wed, 20 Jul 2005 02:26:21 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 (ax)

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13854>

                 Summary: Using EVAL and #!key
                 Project: Kawa
            Submitted by: dferreyra
            Submitted on: Wed 07/20/2005 at 02:26
                Category: Scheme language
                Severity: 3 - Normal
              Item Group: Run-time exception
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

I've boiled down a problem we've run into with the CVS version of Kawa.  If I
compile and run this code:

  (module-static #t)
  
  (eval '(define (f a #!key (msg "nothing"))
           msg))
  
  (eval '(begin
           (require 'srfi-1)
           (f 1)))

I get an ArrayIndexOutOfBoundsException.  Comment out the (require ...) line
or add a #!rest before the #!key like so:

  (eval '(define (f a #!rest rest #!key (msg "nothing"))
           msg))

and the problem goes away.

Here's what my compile looks like:

% make PURE=1 default
rm -f *.class
CLASSPATH=.:~/kawa/cvs/kawa-pure-build/kawa-1.7.91.jar java kawa.repl
--warn-undefined-variable --module-static-run --main -C test.scm
(compiling test.scm)
CLASSPATH=.:~/kawa/cvs/kawa-pure-build/kawa-1.7.91.jar java test
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at atEvalLevel.applyN(test.scm:3)
        at gnu.expr.ModuleBody.apply0(ModuleBody.java:147)
        at gnu.expr.ModuleMethod.apply0(ModuleMethod.java:177)
        at gnu.expr.ModuleMethod.apply(ModuleMethod.java:151)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:247)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:218)
        at kawa.lang.Eval.evalBody(Eval.java:104)
        at kawa.lang.Eval.eval(Eval.java:31)
        at kawa.lang.Eval.apply(Eval.java:138)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:247)
        at gnu.expr.ModuleBody.runCleanup(ModuleBody.java:60)
        at gnu.expr.ModuleBody.run(ModuleBody.java:51)
        at gnu.expr.ModuleBody.run(ModuleBody.java:32)
        at test.<clinit>(test.scm)
make: *** [run] Error 1







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13854>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]