mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Identifiers in the template should only match pattern variables
from the same expansion step. Fixes issue #366.
This commit is contained in:
parent
6d6654fd13
commit
d0cb74bef4
3 changed files with 11 additions and 5 deletions
|
@ -1,4 +0,0 @@
|
|||
language: c
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
|
@ -848,7 +848,7 @@
|
|||
(cond
|
||||
((identifier? t)
|
||||
(cond
|
||||
((find (lambda (v) (compare t (car v))) vars)
|
||||
((find (lambda (v) (eq? t (car v))) vars)
|
||||
=> (lambda (cell)
|
||||
(if (<= (cdr cell) dim)
|
||||
t
|
||||
|
|
|
@ -499,6 +499,16 @@
|
|||
#f)
|
||||
(test 1 x))
|
||||
|
||||
(let ()
|
||||
(define-syntax foo
|
||||
(syntax-rules ()
|
||||
((foo bar y)
|
||||
(define-syntax bar
|
||||
(syntax-rules ()
|
||||
((bar x) 'y))))))
|
||||
(foo bar x)
|
||||
(test 'x (bar 1)))
|
||||
|
||||
(test-end)
|
||||
|
||||
(test-begin "5 Program structure")
|
||||
|
|
Loading…
Add table
Reference in a new issue