diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-subforms-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-subforms-unit.rkt index 70ae21dc..3d4efb8d 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-subforms-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-subforms-unit.rkt @@ -9,6 +9,7 @@ (private syntax-properties) (utils tc-utils) (for-syntax racket/base syntax/parse) + (for-template racket/base) (rep type-rep)) (import tc-if^ tc-lambda^ tc-app^ tc-let^ tc-expr^) @@ -41,7 +42,10 @@ #'(let loop ([form init-form]) (parameterize ([current-orig-stx form]) (syntax-parse form + #:literals (quote-syntax) [clause bodies ...] ... + ;; avoid going under quote-syntax, nothing to typecheck + [(quote-syntax . rst) (void)] [(a . b) (loop #'a) (loop #'b) ] diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/pr14355.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/pr14355.rkt new file mode 100644 index 00000000..aa87a9b6 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/pr14355.rkt @@ -0,0 +1,8 @@ +#lang typed/racket + +;; Test for PR 14355. Ideally would be a unit test, but +;; the bug could not be triggered via the harness + +;; make sure this doesn't result in an internal error +(cast (cast "x" String) String) +