Skip to content

exclude #f not always work for Option type #1103

Open
@dannypsnl

Description

@dannypsnl

What version of Racket are you using?

8.1 or later [CS]

What program did you run?

(define-type F (Option (-> Void)))

(: foo : F -> Void)
(define (foo f)
  (match f
    [#f (void)]
    [f (f)]))

What should have happened?

type check pass as the following program

(define-type F (Option (-> Void)))

(: foo : F -> Void)
(define (foo f)
  (when f
    (f)))

If you got an error message, please include it here.

Type Checker: Cannot apply expression of type F, since it is not a function type in: (f)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions