Summary
Incorrect Expansion of => Clauses with Literals in Cond
Metadata
- Id: 060c4a3d28f4f96693c5ea5aeb2b938f864eeabc
- Trac id: 1284
- Type: defect
- Reporter: rnvannatta
- Owner:
- Cc:
- Status: closed
- Component: expander
- Estimated difficulty:
- Resolution: invalid
- Priority: not urgent at all
- Milestone: someday
- Version: 4.9.x
- Changetime: 2016-04-25 23:30:17 UTC
- Created: 2016-04-25 22:42:22 UTC
- Keywords: cond =>
Description
A clause in a cond statement of the form `(<literal> => proc)` where <literal> is any literal except #f does not evaluate correctly. Upon evaluation of `(cond (#t => identity)`, chicken throws the following error:
#;>(cond (#t => identity)) Error: unbound variable: => Call history: <syntax> (cond (#t => identity)) <syntax> (##core#begin => identity) <--'')
The code should expand to
(##core#let ((tmp #t)) (##core#if tmp (identity tmp) (##core#undefined)))
as it does for non-literal values.
Changes and comments
[2016-04-25 23:30:17 UTC] evhan changed status from new to closed
[2016-04-25 23:30:17 UTC] evhan set resolution to invalid
[2016-04-25 23:30:17 UTC] evhan wrote:
Thanks for the report. This has already been fixed in CHICKEN 4.10 and on. If you can upgrade to 4.10 (4.9.0 is roughly two years old now), please do so and let us know if you see the same behaviour.