diff --git a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt index a61db9db..a1376e4e 100644 --- a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -875,6 +875,8 @@ ;;Path tests + (tc-e (path-string? "foo") B) + (tc-e (path-string? (string->path "foo")) #:ret (ret B (-FS -top -bot))) (tc-e (bytes->path #"foo" 'unix) -SomeSystemPath) (tc-e (bytes->path #"foo") -Path) (tc-e (bytes->path-element #"foo") -Path) diff --git a/collects/typed-racket/base-env/base-env.rkt b/collects/typed-racket/base-env/base-env.rkt index 2ee2440b..3f198c66 100644 --- a/collects/typed-racket/base-env/base-env.rkt +++ b/collects/typed-racket/base-env/base-env.rkt @@ -790,7 +790,9 @@ ;; path manipulation [path? (make-pred-ty -Path)] -[path-string? (-> Univ B)] +[path-string? (asym-pred Univ B + (-FS (-filter (Un -Path -String) 0) + (-not-filter -Path 0)))] [path-for-some-system? (make-pred-ty -SomeSystemPath)] [string->path (-> -String -Path)]