From 013b12b19d56e051fddd6bd09d6c07115088b14e Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Fri, 26 Feb 2010 15:15:43 +0000 Subject: [PATCH] fix obvious bug pointed out by noel svn: r18351 --- collects/typed-scheme/typecheck/tc-if.ss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/typed-scheme/typecheck/tc-if.ss b/collects/typed-scheme/typecheck/tc-if.ss index b286b474d4..9bb9f5e7a5 100644 --- a/collects/typed-scheme/typecheck/tc-if.ss +++ b/collects/typed-scheme/typecheck/tc-if.ss @@ -57,9 +57,9 @@ r))] ;; special case if one of the branches is unreachable [(and (= 1 (length us)) (type-equal? (car us) (Un))) - (if expected (check-below (ret ts fs2 os2)) (ret ts fs2 os2))] + (if expected (check-below (ret ts fs2 os2) expected) (ret ts fs2 os2))] [(and (= 1 (length ts)) (type-equal? (car ts) (Un))) - (if expected (check-below (ret us fs3 os3)) (ret us fs3 os3))] + (if expected (check-below (ret us fs3 os3) expected) (ret us fs3 os3))] ;; otherwise, error [else (tc-error/expr #:return (ret (or expected Err))