这是indexloc提供的服务,不要输入任何密码
Skip to content

wrong/unsound type for path-has-extension? #1459

@LiberalArtist

Description

@LiberalArtist

This program typechecks, but shouldn't, because x is #true:

#lang typed/racket
(define x : (U Bytes False)
  (path-has-extension? "a.git" ".git"))

The type of path-has-extension? is currently:

(-> (U Path-For-Some-System Path-String) (U Bytes String) (U Bytes False))

but the result type should actually be Boolean, the same as the documented contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions