Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision da6032af502965c70852c25c55ab7e2d3bf02146)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 43e0949c5f8c1f5a4cfb68e9506dd718e55a6b07)
@@ -367,5 +367,5 @@
 			std::string tmp;
 			if ( val >= 0 && (unsigned long long)val < tupleType->size() ) {
-				alternatives.push_back( Alternative{ 
+				alternatives.push_back( Alternative{
 					alt, new TupleIndexExpr( expr->clone(), val ), newCost } );
 			} // if
@@ -474,5 +474,5 @@
 		}
 
-		// specialization cost of return types can't be accounted for directly, it disables 
+		// specialization cost of return types can't be accounted for directly, it disables
 		// otherwise-identical calls, like this example based on auto-newline in the I/O lib:
 		//
@@ -1225,6 +1225,6 @@
 				// count one safe conversion for each value that is thrown away
 				thisCost.incSafe( discardedValues );
-				Alternative newAlt{ 
-					restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ), 
+				Alternative newAlt{
+					restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ),
 					alt.env, openVars, needAssertions, alt.cost, alt.cost + thisCost };
 				inferParameters( newAlt, back_inserter( candidates ) );
@@ -1290,5 +1290,5 @@
 
 	void AlternativeFinder::Finder::postvisit( NameExpr *nameExpr ) {
-		std::list< SymTab::Indexer::IdData > declList;
+		std::vector< SymTab::Indexer::IdData > declList;
 		indexer.lookupId( nameExpr->name, declList );
 		PRINT( std::cerr << "nameExpr is " << nameExpr->name << std::endl; )
@@ -1327,5 +1327,5 @@
 		if ( sizeofExpr->get_isType() ) {
 			Type * newType = sizeofExpr->get_type()->clone();
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				new SizeofExpr{ resolveTypeof( newType, indexer ) }, env } );
 		} else {
@@ -1342,5 +1342,5 @@
 			Alternative &choice = winners.front();
 			referenceToRvalueConversion( choice.expr, choice.cost );
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				choice, new SizeofExpr( choice.expr->clone() ), Cost::zero } );
 		} // if
@@ -1350,5 +1350,5 @@
 		if ( alignofExpr->get_isType() ) {
 			Type * newType = alignofExpr->get_type()->clone();
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				new AlignofExpr{ resolveTypeof( newType, indexer ) }, env } );
 		} else {
@@ -1365,5 +1365,5 @@
 			Alternative &choice = winners.front();
 			referenceToRvalueConversion( choice.expr, choice.cost );
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				choice, new AlignofExpr{ choice.expr->clone() }, Cost::zero } );
 		} // if
@@ -1376,5 +1376,5 @@
 		for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
 			if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) {
-				alternatives.push_back( Alternative{ 
+				alternatives.push_back( Alternative{
 					new OffsetofExpr{ aggInst->clone(), dwt }, env } );
 				renameTypes( alternatives.back().expr );
@@ -1420,6 +1420,6 @@
 				Cost cost = Cost::zero;
 				Expression * newExpr = data.combine( cost );
-				alternatives.push_back( Alternative{ 
-					new AttrExpr{ newExpr, argType->clone() }, env, OpenVarSet{}, 
+				alternatives.push_back( Alternative{
+					new AttrExpr{ newExpr, argType->clone() }, env, OpenVarSet{},
 					AssertionList{}, Cost::zero, cost } );
 				for ( DeclarationWithType * retVal : function->returnVals ) {
@@ -1434,5 +1434,5 @@
 		NameExpr *nameExpr = dynamic_cast< NameExpr* >( attrExpr->get_attr() );
 		assert( nameExpr );
-		std::list< SymTab::Indexer::IdData > attrList;
+		std::vector< SymTab::Indexer::IdData > attrList;
 		indexer.lookupId( nameExpr->get_name(), attrList );
 		if ( attrExpr->get_isType() || attrExpr->get_expr() ) {
@@ -1461,5 +1461,5 @@
 				Cost cost = Cost::zero;
 				Expression * newExpr = data.combine( cost );
-				alternatives.push_back( Alternative{ 
+				alternatives.push_back( Alternative{
 					newExpr, env, OpenVarSet{}, AssertionList{}, Cost::zero, cost } );
 				renameTypes( alternatives.back().expr );
@@ -1485,8 +1485,8 @@
 				cloneAll( second.need, need );
 
-				LogicalExpr *newExpr = new LogicalExpr{ 
+				LogicalExpr *newExpr = new LogicalExpr{
 					first.expr->clone(), second.expr->clone(), logicalExpr->get_isAnd() };
-				alternatives.push_back( Alternative{ 
-					newExpr, std::move(compositeEnv), std::move(openVars), 
+				alternatives.push_back( Alternative{
+					newExpr, std::move(compositeEnv), std::move(openVars),
 					AssertionList( need.begin(), need.end() ), first.cost + second.cost } );
 			}
@@ -1521,21 +1521,21 @@
 					cloneAll( third.need, need );
 					AssertionSet have;
-					
+
 					// unify true and false types, then infer parameters to produce new alternatives
 					Type* commonType = nullptr;
-					if ( unify( second.expr->result, third.expr->result, compositeEnv, 
+					if ( unify( second.expr->result, third.expr->result, compositeEnv,
 							need, have, openVars, indexer, commonType ) ) {
-						ConditionalExpr *newExpr = new ConditionalExpr{ 
+						ConditionalExpr *newExpr = new ConditionalExpr{
 							first.expr->clone(), second.expr->clone(), third.expr->clone() };
 						newExpr->result = commonType ? commonType : second.expr->result->clone();
 						// convert both options to the conditional result type
 						Cost cost = first.cost + second.cost + third.cost;
-						cost += computeExpressionConversionCost( 
+						cost += computeExpressionConversionCost(
 							newExpr->arg2, newExpr->result, indexer, compositeEnv );
-						cost += computeExpressionConversionCost( 
+						cost += computeExpressionConversionCost(
 							newExpr->arg3, newExpr->result, indexer, compositeEnv );
 						// output alternative
-						Alternative newAlt{ 
-							newExpr, std::move(compositeEnv), std::move(openVars), 
+						Alternative newAlt{
+							newExpr, std::move(compositeEnv), std::move(openVars),
 							AssertionList( need.begin(), need.end() ), cost };
 						inferParameters( newAlt, back_inserter( alternatives ) );
@@ -1552,5 +1552,5 @@
 		secondFinder.findWithAdjustment( commaExpr->get_arg2() );
 		for ( const Alternative & alt : secondFinder.alternatives ) {
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				alt, new CommaExpr{ newFirstArg->clone(), alt.expr->clone() }, alt.cost } );
 		} // for
@@ -1578,11 +1578,11 @@
 
 				Type* commonType = nullptr;
-				if ( unify( first.expr->result, second.expr->result, compositeEnv, need, have, 
+				if ( unify( first.expr->result, second.expr->result, compositeEnv, need, have,
 						openVars, indexer, commonType ) ) {
-					RangeExpr * newExpr = 
+					RangeExpr * newExpr =
 						new RangeExpr{ first.expr->clone(), second.expr->clone() };
 					newExpr->result = commonType ? commonType : first.expr->result->clone();
-					Alternative newAlt{ 
-						newExpr, std::move(compositeEnv), std::move(openVars), 
+					Alternative newAlt{
+						newExpr, std::move(compositeEnv), std::move(openVars),
 						AssertionList( need.begin(), need.end() ), first.cost + second.cost };
 					inferParameters( newAlt, back_inserter( alternatives ) );
@@ -1611,7 +1611,7 @@
 				cloneAll( alt.need, need );
 			}
-			
-			alternatives.push_back( Alternative{ 
-				new TupleExpr{ exprs }, std::move(compositeEnv), std::move(openVars), 
+
+			alternatives.push_back( Alternative{
+				new TupleExpr{ exprs }, std::move(compositeEnv), std::move(openVars),
 				AssertionList( need.begin(), need.end() ), sumCost( alts ) } );
 		} // for
@@ -1632,5 +1632,5 @@
 		finder.findWithoutPrune( ctorExpr->get_callExpr() );
 		for ( Alternative & alt : finder.alternatives ) {
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				alt, new ConstructorExpr( alt.expr->clone() ), alt.cost } );
 		}
@@ -1684,21 +1684,21 @@
 				cloneAll( alt.need, need );
 				AssertionSet have;
-				OpenVarSet openVars( alt.openVars );  
-				// xxx - find things in env that don't have a "representative type" and claim 
+				OpenVarSet openVars( alt.openVars );
+				// xxx - find things in env that don't have a "representative type" and claim
 				// those are open vars?
 				PRINT(
 					std::cerr << "  @ " << toType << " " << initAlt.designation << std::endl;
 				)
-				// It's possible that a cast can throw away some values in a multiply-valued 
-				// expression. (An example is a cast-to-void, which casts from one value to 
-				// zero.)  Figure out the prefix of the subexpression results that are cast 
-				// directly.  The candidate is invalid if it has fewer results than there are 
+				// It's possible that a cast can throw away some values in a multiply-valued
+				// expression. (An example is a cast-to-void, which casts from one value to
+				// zero.)  Figure out the prefix of the subexpression results that are cast
+				// directly.  The candidate is invalid if it has fewer results than there are
 				// types to cast to.
 				int discardedValues = alt.expr->result->size() - toType->size();
 				if ( discardedValues < 0 ) continue;
-				// xxx - may need to go into tuple types and extract relevant types and use 
-				// unifyList. Note that currently, this does not allow casting a tuple to an 
+				// xxx - may need to go into tuple types and extract relevant types and use
+				// unifyList. Note that currently, this does not allow casting a tuple to an
 				// atomic type (e.g. (int)([1, 2, 3]))
-				
+
 				// unification run for side-effects
 				unify( toType, alt.expr->result, newEnv, need, have, openVars, indexer );
@@ -1709,8 +1709,8 @@
 					// count one safe conversion for each value that is thrown away
 					thisCost.incSafe( discardedValues );
-					Alternative newAlt{ 
-						new InitExpr{ 
-							restructureCast( alt.expr->clone(), toType, true ), initAlt.designation->clone() }, 
-						std::move(newEnv), std::move(openVars), 
+					Alternative newAlt{
+						new InitExpr{
+							restructureCast( alt.expr->clone(), toType, true ), initAlt.designation->clone() },
+						std::move(newEnv), std::move(openVars),
 						AssertionList( need.begin(), need.end() ), alt.cost, thisCost };
 					inferParameters( newAlt, back_inserter( candidates ) );
