Improves term-let's "too few ellipses" error
Fixes PR 10837
This commit is contained in:
parent
143e1e66fd
commit
989103c3a1
|
@ -174,7 +174,7 @@
|
|||
[x
|
||||
(and (identifier? #'x)
|
||||
(not (free-identifier=? (quote-syntax ...) #'x)))
|
||||
(let ([new-name (car (generate-temporaries (list #'x)))])
|
||||
(let ([new-name (datum->syntax #'here (syntax-e #'x))])
|
||||
(values (list #'x)
|
||||
(list new-name)
|
||||
(list depth)
|
||||
|
|
|
@ -2328,6 +2328,35 @@
|
|||
(test (sorted-counts c) '(1 0))
|
||||
(test (sorted-counts c*) '(1 0)))))
|
||||
|
||||
|
||||
;
|
||||
;
|
||||
;
|
||||
; ;
|
||||
; ; ; ;
|
||||
; ; ; ;
|
||||
; ;;; ;;; ; ;; ;;;;; ; ;;; ;;;
|
||||
; ; ; ; ;; ; ; ; ; ;;;;; ; ; ; ;
|
||||
; ; ;;;;; ; ; ; ; ; ; ;;;;; ;
|
||||
; ; ; ; ; ; ; ; ; ;
|
||||
; ; ; ; ; ; ; ; ; ; ; ;
|
||||
; ;; ;;; ; ; ; ; ;; ;;; ;;
|
||||
;
|
||||
;
|
||||
;
|
||||
|
||||
(test (parameterize ([current-namespace syn-err-test-namespace])
|
||||
(with-handlers ([exn:fail:syntax?
|
||||
(λ (exn)
|
||||
(match (exn:fail:syntax-exprs exn)
|
||||
[(list e) (syntax->datum e)]
|
||||
[_ (gensym 'wrong)]))])
|
||||
(expand
|
||||
'(term-let ([((label ...) ...) '()])
|
||||
(term (label ...))))
|
||||
(gensym 'wrong)))
|
||||
'label)
|
||||
|
||||
;
|
||||
;
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue
Block a user