syntax/parse: add regression test, related to #2320, #2330

This commit is contained in:
Ryan Culpepper 2018-10-24 18:08:24 +02:00
parent fce5554695
commit 11c1a2eaf6

View File

@ -973,3 +973,16 @@
[(:ids) (syntax->datum #'(k ...))] [(:ids) (syntax->datum #'(k ...))]
[_ #f]) [_ #f])
'(a b c))) '(a b c)))
;; from Sam TH and Alex Knauth (10/2018)
(convert-syntax-error
(let ()
(define-syntax (object stx)
(define-syntax-class f
[pattern _ #:with x #'ths])
(syntax-parse stx
[(object f:f)
#:with x #'ths
#'(define (f.x) ths)]))
(object 1)
(void)))