fix expected-ty propagation in cond else; closes #3
This commit is contained in:
parent
7f593b52c8
commit
c89aa1be19
|
@ -482,7 +482,7 @@
|
|||
#:when (same-types? #'(ty_body ...))
|
||||
#:with τ_out (stx-car #'(ty_body ...))
|
||||
#:with [last-body- last-ty] (if (attribute else_body)
|
||||
(infer+erase #'else_body)
|
||||
(infer+erase #'(add-expected else_body ty-expected))
|
||||
(infer+erase #'(void)))
|
||||
#:with ([last-b- last-b-ty] ...) (if (attribute else_body)
|
||||
(infers+erase #'(else_b ...))
|
||||
|
|
|
@ -32,3 +32,7 @@
|
|||
(h))
|
||||
|
||||
(check-type i : (→/test (Result Int String)))
|
||||
|
||||
(define (f/cond [b : Bool] -> (Result Int String))
|
||||
(cond [b (ok 1)]
|
||||
[else (ok 0)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user