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 b34c12a4..8f47513b 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 @@ -259,8 +259,9 @@ ;; special case (even when complex printing is off) because it's ;; useful to users who use functions like `filter`. [(Values: (list (Result: t - (FilterSet: (TypeFilter: ft '() id) (Top:)) + (FilterSet: (TypeFilter: ft '() (list 0 0)) (Top:)) (Empty:)))) + #:when (= 1 (length dom)) `(,(type->sexp t) : #:+ ,(type->sexp ft))] [(Values: (list (Result: t fs (Empty:)))) (if (print-complex-filters?) 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 68645a16..bbc1a0ff 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 @@ -75,6 +75,10 @@ "(-> Any Boolean : String)") (check-prints-as? (asym-pred Univ -Boolean (-FS (-filter -String 0) -top)) "(-> Any Boolean : #:+ String)") + (check-prints-as? (-> Univ Univ -Boolean : (-FS (-filter -String 0) -top)) + "(-> Any Any Boolean)") + (check-prints-as? (-> Univ Univ -Boolean : (-FS (-filter -String 1) -top)) + "(-> Any Any Boolean)") ;; PR 14510 (next three tests) (check-prints-as? (-> Univ (-> Univ -Boolean : (-FS (-filter -String '(1 0)) (-not-filter -String '(1 0)))))