mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
duplicate labels only forbidden for definition, not referencing
This commit is contained in:
parent
1e76e39b9a
commit
c1e7e1f23a
1 changed files with 2 additions and 2 deletions
|
@ -322,10 +322,10 @@
|
||||||
(n (string->number str)))
|
(n (string->number str)))
|
||||||
(if (not n)
|
(if (not n)
|
||||||
(read-error "read error: invalid reference" str))
|
(read-error "read error: invalid reference" str))
|
||||||
(if (assv n shared)
|
|
||||||
(read-error "read error: duplicate label" str))
|
|
||||||
(cond
|
(cond
|
||||||
((eqv? #\= (peek-char in))
|
((eqv? #\= (peek-char in))
|
||||||
|
(if (assv n shared)
|
||||||
|
(read-error "read error: duplicate label" str))
|
||||||
(read-char in)
|
(read-char in)
|
||||||
(let* ((cell (list #f))
|
(let* ((cell (list #f))
|
||||||
(thunk (lambda () (car cell))))
|
(thunk (lambda () (car cell))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue