handle multiple body expression properly

original commit: 0262ef681ac4394f9c2f8f19836777ee1fcc7a56
This commit is contained in:
Sam Tobin-Hochstadt 2010-06-17 12:50:30 -04:00
parent 6b89ef5f82
commit d31b37acc1

View File

@ -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)