bugKawa - Bugs: bug #53262, Kawa 'loses' arguments for...

 
 

bug #53262: Kawa 'loses' arguments for functions with dotted pair arguments.

Submitter:  None
Submitted:  Fri 02 Mar 2018 09:28:15 AM UTC
   
 
Category:  Scheme language Severity:  3 - Normal
Item Group:  Unexpected result Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 03 Mar 2018 12:25:11 AM UTC, comment #1: 

Thanks for the bug report and nice testcase. I checked in to 'master' a fix and a testcase based on your test.

Per Bothner <bothner>
Group administrator
Fri 02 Mar 2018 09:28:15 AM UTC, original submission:  

Here is a simple reproduction of the bug.

#|kawa:6|# (define (f op . args)
#|.....7|#  (if (> (length args) 0)
#|.....8|#    (begin (display args) (newline) (f op (car args) (cadr args)))
#|.....9|#    (begin (display "done") (newline))))
#|kawa:10|# (f 'exp 1 2 3)
(1 2 3)
(2)  =======> !!!! NOTE: This should be (1 2), not just (2) <===
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
java.lang.ClassCastException: gnu.lists.EmptyList (in module: Unnamed Module) cannot be cast to gnu.lists.Pair (in module: Unnamed Module)
        at kawa.lib.lists.cadr(lists.scm:67)
        at atInteractiveLevel-6.f$V(stdin:8)
        at atInteractiveLevel-6.f$check(stdin:6)
        at gnu.mapping.Procedure.applyToConsumerDefault(Procedure.java:75)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:586)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:342)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:211)
        at kawa.Shell.run(Shell.java:283)
        at kawa.Shell.run(Shell.java:196)
        at kawa.Shell.run(Shell.java:183)
        at kawa.repl.processArgs(repl.java:714)
        at kawa.repl.main(repl.java:820)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-03 bothner StatusNone Fixed
        Assigned toNone bothner

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code