From 0f347883dde32afe2ff974019091c7b634d5fbba Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 27 Oct 2008 20:03:16 +0000 Subject: [PATCH] Warn about unreachable code. svn: r12146 --- collects/typed-scheme/typecheck/tc-if-unit.ss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collects/typed-scheme/typecheck/tc-if-unit.ss b/collects/typed-scheme/typecheck/tc-if-unit.ss index dfa3a27fea..bf3a4e43bb 100644 --- a/collects/typed-scheme/typecheck/tc-if-unit.ss +++ b/collects/typed-scheme/typecheck/tc-if-unit.ss @@ -52,6 +52,8 @@ (if (null? effs) ;; base case (let* ([reachable? (not (unbox flag))]) + (unless reachable? + (warn-unreachable expr)) (cond ;; if flag is true, then we don't want to verify that this branch has the appropriate type ;; in particular, it might be (void)