diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt index cc80fabf..a99975f7 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt @@ -1210,7 +1210,7 @@ [make-parameter (-poly (a b) (cl-> [(a) (-Param a a)] [(b (a . -> . b)) (-Param a b)]))] [make-derived-parameter (-poly (a b c d) (-> (-Param a b) (-> c a) (-> b d) (-Param c d)))] -[parameter? (make-pred-ty (-poly (a b) (-Param a b)))] +[parameter? (make-pred-ty (-Param -Bottom Univ))] [parameter-procedure=? (-poly (a b c d) (-> (-Param a b) (-Param c d) B))] [current-parameterization (-> -Parameterization)] diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt index fe777ac9..6fe278b5 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -1948,6 +1948,14 @@ #:ret (ret (list (-val 'a) (-val 'b)))] [tc-e (call-with-input-bytes #"abcd" (lambda: ([input : Input-Port]) (values 'a 'b))) #:ret (ret (list (-val 'a) (-val 'b)))] + + [tc-e (lambda: ([x : (U (Parameter Symbol) Symbol)]) + (if (parameter? x) + (x) + x)) + #:ret (ret (t:-> (t:Un (-Param -Symbol -Symbol) -Symbol) -Symbol)) + #:expected (ret (t:-> (t:Un (-Param -Symbol -Symbol) -Symbol) -Symbol))] + ) (test-suite "tc-literal tests"