[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#1791: format-date reports bad argument count
From: |
Chicken Trac |
Subject: |
#1791: format-date reports bad argument count |
Date: |
Thu, 14 Oct 2021 14:35:06 -0000 |
#1791: format-date reports bad argument count
------------------------------------+---------------------
Reporter: Norman Gray | Type: defect
Status: new | Priority: major
Milestone: someday | Component: unknown
Version: 5.2.0 | Keywords:
Estimated difficulty: |
------------------------------------+---------------------
When I try to evaluate the following program with csi, I get an error
{{{
% cat try.scm
(import srfi-19-date srfi-19-io)
(write (format-date "~Y-~m-~d" (current-date)))
% csi try.scm
CHICKEN
(c) 2008-2020, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.2.0 (rev 317468e4)
macosx-unix-clang-x86-64 [ 64bit dload ptables ]
Type ,? for help.
; loading try.scm ...
; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-19-date.import.so
...
; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-19-io.import.so
...
; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-19-date.so ...
; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-1.so ...
[..blah...]
; loading /Data/tools/chicken-5.2.0/lib/chicken/11/exn-condition.so ...
; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-29-install.so ...
Error: bad argument count - received 0 but expected 1: #<procedure
(chicken.base#open-input-string string)>
Call history:
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:144: char-downcase-single
utf8-case-map.scm:50: utf8-lolevel#write-utf8-char
utf8-case-map.scm:224: loop
<syntax> (write "date is ~a~%" (format-date "~Y-~m-~d"
(current-date)))
<syntax> (format-date "~Y-~m-~d" (current-date))
<syntax> (current-date)
<eval> (write "date is ~a~%" (format-date "~Y-~m-~d" (current-
date)))
<eval> (format-date "~Y-~m-~d" (current-date))
<eval> (current-date) <--
}}}
If instead I compile it with csc and run it, then I get:
{{{
% ./try
Error: bad argument count - received 0 but expected 1: #<procedure
(chicken.base#open-input-string string)>
Call history:
utf8-case-map.scm:222: utf8-lolevel#read-utf8-char
utf8-case-map.scm:223: char-downcase-locale
utf8-case-map.scm:215: char-downcase*
utf8-case-map.scm:143: char-map-multi-case
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:117: loop
utf8-case-map.scm:144: char-downcase-single
utf8-case-map.scm:50: utf8-lolevel#write-utf8-char
utf8-case-map.scm:224: loop
try.scm:2: srfi-19-date#current-date
try.scm:2: srfi-19-io#format-date <--
}}}
which seems to be clearly pointing towards the same thing.
I'm sure this used to work (maybe in 5.0.0), so this appears to be a
regression.
--
Ticket URL: <https://bugs.call-cc.org/ticket/1791>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- #1791: format-date reports bad argument count,
Chicken Trac <=