Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision e6512c8966c9469a0d71ef9ff94e01b78a3f68fb)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 32b8144a5e42cc6f2c3a559f216f1cef32992967)
@@ -1044,13 +1044,17 @@
 
 	void AlternativeFinder::visit( ConditionalExpr *conditionalExpr ) {
+		// find alternatives for condition
 		AlternativeFinder firstFinder( indexer, env );
 		firstFinder.findWithAdjustment( conditionalExpr->get_arg1() );
 		for ( AltList::const_iterator first = firstFinder.alternatives.begin(); first != firstFinder.alternatives.end(); ++first ) {
+			// find alternatives for true expression
 			AlternativeFinder secondFinder( indexer, first->env );
 			secondFinder.findWithAdjustment( conditionalExpr->get_arg2() );
 			for ( AltList::const_iterator second = secondFinder.alternatives.begin(); second != secondFinder.alternatives.end(); ++second ) {
+				// find alterantives for false expression
 				AlternativeFinder thirdFinder( indexer, second->env );
 				thirdFinder.findWithAdjustment( conditionalExpr->get_arg3() );
 				for ( AltList::const_iterator third = thirdFinder.alternatives.begin(); third != thirdFinder.alternatives.end(); ++third ) {
+					// unify true and false types, then infer parameters to produce new alternatives
 					OpenVarSet openVars;
 					AssertionSet needAssertions, haveAssertions;
@@ -1079,4 +1083,26 @@
 	}
 
+	void AlternativeFinder::visit( RangeExpr * rangeExpr ) {
+		// resolve low and high, accept alternatives whose low and high types unify
+		AlternativeFinder firstFinder( indexer, env );
+		firstFinder.findWithAdjustment( rangeExpr->get_low() );
+		for ( AltList::const_iterator first = firstFinder.alternatives.begin(); first != firstFinder.alternatives.end(); ++first ) {
+			AlternativeFinder secondFinder( indexer, first->env );
+			secondFinder.findWithAdjustment( rangeExpr->get_high() );
+			for ( AltList::const_iterator second = secondFinder.alternatives.begin(); second != secondFinder.alternatives.end(); ++second ) {
+				OpenVarSet openVars;
+				AssertionSet needAssertions, haveAssertions;
+				Alternative newAlt( 0, second->env, first->cost + second->cost );
+				Type* commonType = nullptr;
+				if ( unify( first->expr->get_result(), second->expr->get_result(), newAlt.env, needAssertions, haveAssertions, openVars, indexer, commonType ) ) {
+					RangeExpr *newExpr = new RangeExpr( first->expr->clone(), second->expr->clone() );
+					newExpr->set_result( commonType ? commonType : first->expr->get_result()->clone() );
+					newAlt.expr = newExpr;
+					inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( alternatives ) );
+				} // if
+			} // for
+		} // for
+	}
+
 	void AlternativeFinder::visit( UntypedTupleExpr *tupleExpr ) {
 		std::list< AlternativeFinder > subExprAlternatives;
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision e6512c8966c9469a0d71ef9ff94e01b78a3f68fb)
+++ src/ResolvExpr/Resolver.cc	(revision 32b8144a5e42cc6f2c3a559f216f1cef32992967)
@@ -302,19 +302,25 @@
 	}
 
-	template< typename SwitchClass >
-	void handleSwitchStmt( SwitchClass *switchStmt, SymTab::Indexer &visitor ) {
+	void Resolver::visit( SwitchStmt *switchStmt ) {
+		ValueGuard< Type * > oldInitContext( initContext );
 		Expression *newExpr;
-		newExpr = findIntegralExpression( switchStmt->get_condition(), visitor );
+		newExpr = findIntegralExpression( switchStmt->get_condition(), *this );
 		delete switchStmt->get_condition();
 		switchStmt->set_condition( newExpr );
 
-		visitor.Visitor::visit( switchStmt );
-	}
-
-	void Resolver::visit( SwitchStmt *switchStmt ) {
-		handleSwitchStmt( switchStmt, *this );
+		initContext = newExpr->get_result();
+		Parent::visit( switchStmt );
 	}
 
 	void Resolver::visit( CaseStmt *caseStmt ) {
+		if ( caseStmt->get_condition() ) {
+			assert( initContext );
+			CastExpr * castExpr = new CastExpr( caseStmt->get_condition(), initContext->clone() );
+			Expression * newExpr = findSingleExpression( castExpr, *this );
+			castExpr = safe_dynamic_cast< CastExpr * >( newExpr );
+			caseStmt->set_condition( castExpr->get_arg() );
+			castExpr->set_arg( nullptr );
+			delete castExpr;
+		}
 		Parent::visit( caseStmt );
 	}
Index: src/tests/dtor-early-exit.c
===================================================================
--- src/tests/dtor-early-exit.c	(revision e6512c8966c9469a0d71ef9ff94e01b78a3f68fb)
+++ src/tests/dtor-early-exit.c	(revision 32b8144a5e42cc6f2c3a559f216f1cef32992967)
@@ -1,10 +1,10 @@
-// 
+//
 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
 //
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
-// 
-// dtor-early-exit.c -- 
-// 
+//
+// dtor-early-exit.c --
+//
 // Author           : Rob Schluntz
 // Created On       : Wed Aug 17 08:26:25 2016
@@ -12,5 +12,5 @@
 // Last Modified On : Wed Aug 17 08:29:37 2016
 // Update Count     : 2
-// 
+//
 
 #include <fstream>
@@ -213,6 +213,6 @@
 		// S_G-S_L = {}
 	}
+#ifdef ERR2
 	// S_G = {}
-#ifdef ERR2
 	if (i == 5) goto L2; // this is an error in g++ because it skips initialization of y, x
 	// S_L-S_G = { y, x } => non-empty, so error
