handle multiple body expression properly
original commit: 0262ef681ac4394f9c2f8f19836777ee1fcc7a56
This commit is contained in:
parent
6b89ef5f82
commit
d31b37acc1
|
@ -235,11 +235,11 @@
|
|||
(tc/rec-lambda/check form args body lp (cons acc-ty ts) expected)
|
||||
expected)]
|
||||
;; special case when argument needs inference
|
||||
[(_ (body*) _)
|
||||
[(_ (body* ...) _)
|
||||
(let ([ts (for/list ([ac (syntax->list actuals)]
|
||||
[f (syntax->list args)])
|
||||
(let* ([infer-t (or (type-annotation f #:infer #t)
|
||||
(find-annotation #'body* f))])
|
||||
(find-annotation #'(begin body* ...) f))])
|
||||
(if infer-t
|
||||
(begin (check-below (tc-expr/t ac) infer-t)
|
||||
infer-t)
|
||||
|
|
Loading…
Reference in New Issue
Block a user