syntax: fix guard for multiple pattern variables under ...
Fix the part of `syntax`/`datum` that determines whether an exception handler is needed to convert an error from `map` to one from `syntax`/`datum`.
This commit is contained in:
parent
a22a3852c6
commit
2e77279be0
|
@ -743,6 +743,16 @@
|
|||
(syntax-test #'(datum-case '(1 "x" -> y) (->) [(a b -> c) (define q 1)])
|
||||
#rx"macro.rktl:.*no expression after a sequence of internal definitions")
|
||||
|
||||
(let ()
|
||||
(define-syntax-rule (check-error clause)
|
||||
(err/rt-test
|
||||
(datum-case '((1 2) (3)) () clause)
|
||||
(lambda (exn)
|
||||
(and (regexp-match? #rx"incompatible ellipsis match counts for template"
|
||||
(exn-message exn))))))
|
||||
(check-error [((a ...) (b ...)) (datum ((a b) ...))])
|
||||
(check-error [((a ...) (b ...)) (datum ((a 0 b) ...))])
|
||||
(check-error [((a ...) (b ...)) (datum (((a) (b)) ...))]))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; Check `#%variable-reference' expansion to make sure
|
||||
|
|
|
@ -1136,7 +1136,7 @@
|
|||
[(and (syntax? p)
|
||||
(prefab-struct-key (syntax-e p)))
|
||||
(loop (cdr (vector->list (struct->vector (syntax-e p)))) use-ellipsis? depth found)]
|
||||
[else #f])))
|
||||
[else found])))
|
||||
|
||||
(-define (no-ellipses? stx)
|
||||
(cond
|
||||
|
|
Loading…
Reference in New Issue
Block a user