Skip to content

Commit cf5dcb9

Browse files
committed
Fix type for path-has-extension?.
Closes #1459.
1 parent f5b2983 commit cf5dcb9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

typed-racket-lib/typed-racket/base-env/base-env.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2889,7 +2889,7 @@
28892889
[simple-form-path (-Pathlike . -> . -Path)]
28902890
[normalize-path (cl->* (-Pathlike [-Pathlike] . ->opt . -Path))]
28912891
[path-get-extension (-SomeSystemPathlike . -> . (-opt -Bytes))]
2892-
[path-has-extension? (-SomeSystemPathlike (Un -String -Bytes) . -> . (-opt -Bytes))]
2892+
[path-has-extension? (-SomeSystemPathlike (Un -String -Bytes) . -> . B)]
28932893
[filename-extension (-SomeSystemPathlike . -> . (-opt -Bytes))]
28942894
[file-name-from-path (-Pathlike . -> . (-opt -Path))]
28952895
[path-only (-SomeSystemPathlike . -> . (-opt -Path))]

typed-racket-test/unit-tests/typecheck-tests.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,7 @@
16321632

16331633
(tc-e (resolve-path "foo") -Path)
16341634
(tc-e (expand-user-path "foo") -Path)
1635+
(tc-e (path-has-extension? "a.git" ".git") -Boolean)
16351636

16361637
;;String Tests
16371638
(tc-e (string? "a") #:ret (tc-ret -Boolean -true-propset))

0 commit comments

Comments
 (0)