From e0cbc15625731c086ab9f28c536ea28e02c8ebdf Mon Sep 17 00:00:00 2001 From: Spencer Florence Date: Sat, 26 Sep 2015 11:33:28 -0500 Subject: [PATCH] fix a bug where cover+tests could call `syntax-local-introduce` when not transforming Closes #204. --- typed-racket-lib/typed-racket/private/parse-type.rkt | 3 ++- typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/typed-racket-lib/typed-racket/private/parse-type.rkt b/typed-racket-lib/typed-racket/private/parse-type.rkt index 36430912..458ef284 100644 --- a/typed-racket-lib/typed-racket/private/parse-type.rkt +++ b/typed-racket-lib/typed-racket/private/parse-type.rkt @@ -597,7 +597,8 @@ (when (current-referenced-aliases) (define alias-box (current-referenced-aliases)) (set-box! alias-box (cons #'id (unbox alias-box)))) - (add-disappeared-use (syntax-local-introduce #'id)) + (and (syntax-transforming?) + (add-disappeared-use (syntax-local-introduce #'id))) t)] [else (parse-error #:delayed? #t (~a "type name `" (syntax-e #'id) "' is unbound")) diff --git a/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt b/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt index 186f93f5..50129d2e 100644 --- a/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt +++ b/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt @@ -39,4 +39,5 @@ #:commit #:literal-sets ([literal-set]) (pattern (~and op (~or pattern-literals ...)) - #:do [(add-disappeared-use (syntax-local-introduce #'op))])))))) + #:do [(and (syntax-transforming?) + (add-disappeared-use (syntax-local-introduce #'op)))]))))))