Index: src/ResolvExpr/CandidateFinder.cpp
===================================================================
--- src/ResolvExpr/CandidateFinder.cpp	(revision 3a7aa94e697cfe6575ffbfec969567cc0eecc91f)
+++ src/ResolvExpr/CandidateFinder.cpp	(revision b96b1c0f864a5a3e2741416d2db714aea7b0c9c6)
@@ -315,4 +315,5 @@
 	/// Instantiates an argument to match a parameter, returns false if no matching results left
 	bool instantiateArgument(
+		const CodeLocation & location,
 		const ast::Type * paramType, const ast::Init * init, const ExplodedArgs_new & args,
 		std::vector< ArgPack > & results, std::size_t & genStart, const ast::SymbolTable & symtab,
@@ -325,5 +326,5 @@
 				// xxx - dropping initializer changes behaviour from previous, but seems correct
 				// ^^^ need to handle the case where a tuple has a default argument
-				if ( ! instantiateArgument(
+				if ( ! instantiateArgument( location,
 					type, nullptr, args, results, genStart, symtab, nTuples ) ) return false;
 				nTuples = 0;
@@ -377,5 +378,5 @@
 							// push empty tuple expression
 							newResult.parent = i;
-							newResult.expr = new ast::TupleExpr{ CodeLocation{}, {} };
+							newResult.expr = new ast::TupleExpr( location, {} );
 							argType = newResult.expr->result;
 						} else {
@@ -692,4 +693,5 @@
 		/// Builds a list of candidates for a function, storing them in out
 		void makeFunctionCandidates(
+			const CodeLocation & location,
 			const CandidateRef & func, const ast::FunctionType * funcType,
 			const ExplodedArgs_new & args, CandidateList & out
@@ -738,5 +740,5 @@
 					for (size_t i=0; i<nParams; ++i) {
 						auto obj = funcDecl->params[i].strict_as<ast::ObjectDecl>();
-						if (!instantiateArgument(
+						if ( !instantiateArgument( location,
 							funcType->params[i], obj->init, args, results, genStart, symtab)) return;
 					}
@@ -748,5 +750,5 @@
 				// matches
 				// no default args for indirect calls
-				if ( ! instantiateArgument(
+				if ( !instantiateArgument( location,
 					param, nullptr, args, results, genStart, symtab ) ) return;
 			}
@@ -978,5 +980,6 @@
 							newFunc->expr =
 								referenceToRvalueConversion( newFunc->expr, newFunc->cost );
-							makeFunctionCandidates( newFunc, function, argExpansions, found );
+							makeFunctionCandidates( untypedExpr->location,
+								newFunc, function, argExpansions, found );
 						}
 					} else if (
@@ -985,8 +988,9 @@
 						if ( const ast::EqvClass * clz = func->env.lookup( *inst ) ) {
 							if ( auto function = clz->bound.as< ast::FunctionType >() ) {
-								CandidateRef newFunc{ new Candidate{ *func } };
+								CandidateRef newFunc( new Candidate( *func ) );
 								newFunc->expr =
 									referenceToRvalueConversion( newFunc->expr, newFunc->cost );
-								makeFunctionCandidates( newFunc, function, argExpansions, found );
+								makeFunctionCandidates( untypedExpr->location,
+									newFunc, function, argExpansions, found );
 							}
 						}
@@ -1014,5 +1018,6 @@
 								newOp->expr =
 									referenceToRvalueConversion( newOp->expr, newOp->cost );
-								makeFunctionCandidates( newOp, function, argExpansions, found );
+								makeFunctionCandidates( untypedExpr->location,
+									newOp, function, argExpansions, found );
 							}
 						}
@@ -1179,5 +1184,5 @@
 					thisCost.incSafe( discardedValues );
 					// select first on argument cost, then conversion cost
-					if (cand->cost < minExprCost || cand->cost == minExprCost && thisCost < minCastCost) {
+					if ( cand->cost < minExprCost || ( cand->cost == minExprCost && thisCost < minCastCost ) ) {
 						minExprCost = cand->cost;
 						minCastCost = thisCost;
@@ -1187,5 +1192,5 @@
 					}
 					// ambiguous case, still output candidates to print in error message
-					if (cand->cost == minExprCost && thisCost == minCastCost) {
+					if ( cand->cost == minExprCost && thisCost == minCastCost ) {
 						CandidateRef newCand = std::make_shared<Candidate>(
 							restructureCast( cand->expr, toType, castExpr->isGenerated ),
@@ -1700,5 +1705,5 @@
 						// count one safe conversion for each value that is thrown away
 						thisCost.incSafe( discardedValues );
-						if (cand->cost < minExprCost || cand->cost == minExprCost && thisCost < minCastCost) {
+						if ( cand->cost < minExprCost || ( cand->cost == minExprCost && thisCost < minCastCost ) ) {
 							minExprCost = cand->cost;
 							minCastCost = thisCost;
@@ -1706,5 +1711,5 @@
 						}
 						// ambiguous case, still output candidates to print in error message
-						if (cand->cost == minExprCost && thisCost == minCastCost) {
+						if ( cand->cost == minExprCost && thisCost == minCastCost ) {
 							CandidateRef newCand = std::make_shared<Candidate>(
 							new ast::InitExpr{
