|
From: | anonymous |
Subject: | [Bug-kawa] [bug #53262] Kawa 'loses' arguments for functions with dotted pair arguments. |
Date: | Fri, 2 Mar 2018 04:28:16 -0500 (EST) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36 |
URL: <http://savannah.gnu.org/bugs/?53262> Summary: Kawa 'loses' arguments for functions with dotted pair arguments. Project: Kawa Submitted by: None Submitted on: Fri 02 Mar 2018 09:28:15 AM UTC Category: Scheme language Severity: 3 - Normal Item Group: Unexpected result Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: 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) _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?53262> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |