Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision b45d4b20b32647a70d1949781b6161c0a4e41629)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 13a615491527669d9d35564c78694c473dbdbfc9)
@@ -319,12 +319,12 @@
 	Cost computeExpressionConversionCost( Expression *& actualExpr, Type * formalType, const SymTab::Indexer &indexer, const TypeEnvironment & env ) {
 		Cost convCost = computeConversionCost( actualExpr->result, formalType, indexer, env );
-		// if ( convCost != Cost::zero ) {
-
-		// xxx - temporary -- ignore poly cost, since this causes some polymorphic functions to be cast, which causes the specialize
-		// pass to try to specialize them, which currently does not work. Once that is fixed, remove the next 3 lines and uncomment the
-		// previous line.
+
+		// if there is a non-zero conversion cost, ignoring poly cost, then the expression requires conversion.
+		// ignore poly cost for now, since this requires resolution of the cast to infer parameters and this
+		// does not currently work for the reason stated below.
 		Cost tmpCost = convCost;
 		tmpCost.incPoly( -tmpCost.get_polyCost() );
 		if ( tmpCost != Cost::zero ) {
+		// if ( convCost != Cost::zero ) {
 			Type *newType = formalType->clone();
 			env.apply( newType );
@@ -914,9 +914,5 @@
 				thisCost.incSafe( discardedValues );
 				Alternative newAlt( restructureCast( i->expr->clone(), toType ), i->env, i->cost, thisCost );
-				// xxx - this doesn't work at the moment, since inferParameters requires an ApplicationExpr as the alternative.
-				// Once this works, it should be possible to infer parameters on a cast expression and specialize any function.
-
 				inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( candidates ) );
-				// candidates.emplace_back( std::move( newAlt ) );
 			} // if
 		} // for
@@ -1297,5 +1293,6 @@
 					// count one safe conversion for each value that is thrown away
 					thisCost.incSafe( discardedValues );
-					candidates.push_back( Alternative( new InitExpr( restructureCast( alt.expr->clone(), toType ), initAlt.designation->clone() ), newEnv, alt.cost, thisCost ) );
+					Alternative newAlt( new InitExpr( restructureCast( alt.expr->clone(), toType ), initAlt.designation->clone() ), newEnv, alt.cost, thisCost );
+					inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( candidates ) );
 				}
 			}
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision b45d4b20b32647a70d1949781b6161c0a4e41629)
+++ src/ResolvExpr/Resolver.cc	(revision 13a615491527669d9d35564c78694c473dbdbfc9)
@@ -593,4 +593,5 @@
 		initExpr->expr = nullptr;
 		std::swap( initExpr->env, newExpr->env );
+		std::swap( initExpr->inferParams, newExpr->inferParams ) ;
 		delete initExpr;
 
