Skip to content

case-lambda doesn't typecheck with rest-args as expected #873

Open
@lwhjp

Description

@lwhjp

What version of Racket are you using?

7.4

What program did you run?

#lang typed/racket

(: foo (-> Any * Any))
(define foo
  (case-lambda
    [() 'one]
    [(a) 'two]
    [(a b . cs) 'three]))

What should have happened?

The program shoudl type-check without error.

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

Type Checker: type mismatch
  expected: (-> Any * Any)
  given: (->* () (Any Any) #:rest Any Any) in: (case-lambda (() (quote one)) ((a) (quote two)) ((a b . cs) (quote three)))

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions