Opened 8 years ago

Closed 8 years ago

#1284 closed defect (invalid)

Incorrect Expansion of => Clauses with Literals in Cond

Reported by: rnvannatta Owned by:
Priority: not urgent at all Milestone: someday
Component: expander Version: 4.9.x
Keywords: cond => Cc:
Estimated difficulty:

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.

Change History (1)

comment:1 Changed 8 years ago by evhan

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.