Index: src/ResolvExpr/CandidateFinder.cpp
===================================================================
--- src/ResolvExpr/CandidateFinder.cpp	(revision c248b39bb4692247b9aeda9dc3201a9132c577c5)
+++ src/ResolvExpr/CandidateFinder.cpp	(revision d68a3f776b49ebef7031d8d117b0bb0eeed3a7ea)
@@ -522,7 +522,8 @@
 								CandidateFinder subFinder( context, env );
 								expr = subFinder.makeEnumOffsetCast(argAsEnum, paramAsEnum, expr, c);
-								results.emplace_back(
-									i, expr, std::move( env ), std::move( need ), std::move( have ), std::move( open ),
-									nextArg + 1, nTuples, expl.cost + c, expl.exprs.size() == 1 ? 0 : 1, j );
+								if ( expr )
+									results.emplace_back(
+										i, expr, std::move( env ), std::move( need ), std::move( have ), std::move( open ),
+										nextArg + 1, nTuples, expl.cost + c, expl.exprs.size() == 1 ? 0 : 1, j );
 								continue;
 							} else {
@@ -1265,5 +1266,6 @@
 				CandidateFinder subFinder(context, tenv);
 				ast::ptr<ast::Expr> offsetExpr = subFinder.makeEnumOffsetCast(argAsEnum, toAsEnum, cand->expr, thisCost);
-				cand->expr = offsetExpr;
+				if ( offsetExpr )
+					cand->expr = offsetExpr;
 			}
 
@@ -2151,8 +2153,5 @@
 
 const ast::Expr * CandidateFinder::makeEnumOffsetCast( const ast::EnumInstType * src, 
-	const ast::EnumInstType * dst,
-	const ast::Expr * expr,
-	Cost minCost ) {
-	
+	const ast::EnumInstType * dst, const ast::Expr * expr, Cost minCost ) {
 	auto srcDecl = src->base;
 	auto dstDecl = dst->base;
@@ -2179,7 +2178,7 @@
 				CandidateRef & choice = winners.front();
 				choice->expr = new ast::CastExpr(expr->location, choice->expr, dstChild, ast::GeneratedFlag::ExplicitCast);
-				castToDst = new ast::CastExpr( 
-					makeEnumOffsetCast( src, dstChild, choice->expr, minCost ),
-					dst);
+				auto destExpr = makeEnumOffsetCast( src, dstChild, choice->expr, minCost );
+				if ( !destExpr ) continue;
+				castToDst = new ast::CastExpr( destExpr, dst );
 			} else {
 				castToDst = new ast::CastExpr( expr, dst );
@@ -2188,5 +2187,4 @@
 		}
 	}
-	SemanticError(expr, src->base->name + " is not a subtype of " + dst->base->name);
 	return nullptr;
 }
