diff --git a/collects/racket/private/stxloc.rkt b/collects/racket/private/stxloc.rkt index 1356fbf00c..b11275697b 100644 --- a/collects/racket/private/stxloc.rkt +++ b/collects/racket/private/stxloc.rkt @@ -33,7 +33,7 @@ (datum->syntax stx (syntax-e stx) loc - #f) + stx) stx)) ;; Like syntax, but also takes a syntax object diff --git a/collects/tests/racket/syntax.rktl b/collects/tests/racket/syntax.rktl index 4b84ef5268..620697f1fb 100644 --- a/collects/tests/racket/syntax.rktl +++ b/collects/tests/racket/syntax.rktl @@ -1433,6 +1433,11 @@ p)) +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Check that `syntax/loc' preserves the 'parent-shape property + +(test #\[ syntax-property (syntax/loc #'a [b c]) 'paren-shape) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (report-errs)