diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt index d8f2ad8c..ab2d4f47 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/printer.rkt @@ -222,7 +222,7 @@ (format "~a ~a" k (type->sexp t)) (format "[~a ~a]" k (type->sexp t)))])) (if rest - (list rest (if (special-dots-printing?) '...* '*)) + (list (type->sexp rest) (if (special-dots-printing?) '...* '*)) null) (if drest (if (special-dots-printing?) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt index 60b0d831..f8754009 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/type-printer-tests.rkt @@ -71,6 +71,9 @@ (check-prints-as? (-> -Input-Port (make-Values (list (-result -String (-FS -top -bot) -no-obj) (-result -String (-FS -top -bot) -no-obj)))) "(Input-Port -> (values (String : (Top | Bot)) (String : (Top | Bot))))") + ;; this case tests that the Number union is printed with its name + ;; rather than its expansion (a former bug) + (check-prints-as? (->* '() -Number -Void) "(Number * -> Void)") (check-prints-as? (->key Univ -Pathlike #:exists (one-of/c 'error 'append 'update 'replace