Improves term-let's "too few ellipses" error

Fixes PR 10837
This commit is contained in:
Casey Klein 2011-04-07 13:13:55 -05:00
parent 143e1e66fd
commit 989103c3a1
2 changed files with 30 additions and 1 deletions

View File

@ -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)

View File

@ -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)
;
;
;