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