diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/top-interaction.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/top-interaction.rkt index 49c00e5f..9ad2353a 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/top-interaction.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/top-interaction.rkt @@ -47,6 +47,7 @@ [current-type-names (if (attribute verbose-kw) '() (current-type-names))] [current-print-unexpanded (box '())]) + (init) (define type (format "~a" (parse-type #'ty))) (define unexpanded (remove-duplicates (unbox (current-print-unexpanded)))) @@ -100,6 +101,7 @@ (λ (stx init) (syntax-parse stx [(_ op desired-type) + (init) (let ([expected (parse-type #'desired-type)]) (tc-setup stx #'op 'top-level expanded init tc-toplevel-form before type (match type diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/interactive-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/interactive-tests.rkt index 24805b60..299755be 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/interactive-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/interactive-tests.rkt @@ -16,8 +16,6 @@ (delay (define ns (make-base-namespace)) (eval '(require typed/racket) ns) - ;; Load TR code. TODO make this not needed (pr/13102) - (eval '(#%top-interaction void) ns) ns)) (define-syntax (test-form-exn stx)