Summary
keywords should not be renamed by syntax expansion
Metadata
- Id: 000b5f2cabdd6e23daedc5e68af95a6673718ded
- Trac id: 277
- Type: defect
- Reporter: felix
- Owner: felix
- Cc: sjamaan
- Status: closed
- Component: expander
- Estimated difficulty:
- Resolution: fixed
- Priority: critical
- Milestone:
- Version: 4.5.x
- Changetime: 2011-04-04 08:31:00 UTC
- Created: 2010-06-27 18:16:57 UTC
- Keywords: keywords
Description
(Example by sjamaan)
(define-syntax foo
(syntax-rules ()
((foo procname)
(define (procname #!key (who "world"))
(print "hello, " who)))))
(foo bar)
(bar who: 1)
expands into:
(set! bar
(##core#lambda
tmp3839
(let ((who3040
(##sys#get-keyword 'who30: tmp3839 (##core#lambda () '"world"))))
(let () (print '"hello, " who3040)))))
and doesn't detect the "who:" keyword correctly on invocation. Note that the `who` variable must be renamed, the keyword not.
Changes and comments
[2010-06-30 09:26:21 UTC] felix changed status from new to closed
[2010-06-30 09:26:21 UTC] felix set resolution to fixed
[2010-06-30 09:26:21 UTC] felix wrote:
Fixed in 3095a8700d0bda4c6a145c70ca5ae1ced6023389 (master).
[2010-06-30 09:29:12 UTC] sjamaan wrote:
Great, thanks Felix!
[2011-04-04 08:31:00 UTC] felix removed milestone 4.6.0
[2011-04-04 08:31:00 UTC] felix wrote:
Milestone 4.6.0 deleted