typed-racket/typed-racket-test/fail/apply-dots.rkt
Andrew Kent 2ef852ae91 fix case lambda (#620)
fix case-lambda checking when no expected type

Not we will check each clause against the other applicable
arrows that are derived during type synthesis for soundness
sake. At a future date, if we instead compute a more 
complete "intersection" of these arrows and then
check against that intersection, that would admit more
correct programs.
2017-10-03 14:20:30 -04:00

14 lines
453 B
Racket

#;
(exn-pred 3)
#lang typed-scheme
(plambda: (a ...) ([z : String] . [w : Number *])
(apply (case-lambda: (([x : Number] . [y : Number ... a]) x))
w))
(plambda: (a ...) ([z : String] . [w : Number *])
(apply (case-lambda: (([x : Number] . [y : Number ... a]) x)
(([x : String] [y : String] . [z : String *]) 0)
([y : String *] 0))
w))