Index: src/ResolvExpr/CandidateFinder.cpp
===================================================================
--- src/ResolvExpr/CandidateFinder.cpp	(revision fb2e9169400799aaa1ef921982323d9b17c85548)
+++ src/ResolvExpr/CandidateFinder.cpp	(revision 7aa209e7409d14817d320fcccfbd6cda3e67303d)
@@ -1400,5 +1400,5 @@
 				}
 			}
-			
+
 			CandidateRef newCand = std::make_shared<Candidate>(
 				newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, bentConversion? Cost::safe: Cost::zero,
@@ -1794,5 +1794,4 @@
 						auto commonAsEnumAttr = common.as<ast::EnumAttrType>();
 						if ( commonAsEnumAttr && commonAsEnumAttr->attr == ast::EnumAttribute::Value ) {
-							
 							auto callExpr = new ast::UntypedExpr(
 								cand->expr->location, new ast::NameExpr( cand->expr->location, "valueE"), {cand->expr} );
@@ -1823,8 +1822,8 @@
 							// if this somehow changes in the future (e.g. delayed by indeterminate return type)
 							// we may need to revisit the logic.
-							inferParameters( newCand, matches );	
+							inferParameters( newCand, matches );
 						}
-					}			
-				}	
+					}
+				}
 			}
 		}
@@ -2151,18 +2150,16 @@
 }
 
-// get the valueE(...) ApplicationExpr that returns the enum value
-const ast::Expr * getValueEnumCall( 
-	const ast::Expr * expr, 
-	const ResolvExpr::ResolveContext & context, const ast::TypeEnvironment & env ) {
-		auto callExpr = new ast::UntypedExpr(
-			expr->location, new ast::NameExpr( expr->location, "valueE"), {expr} );
-		CandidateFinder finder( context, env );
-		finder.find( callExpr );
-		CandidateList winners = findMinCost( finder.candidates );
-		if (winners.size() != 1) {
-			SemanticError( callExpr, "Ambiguous expression in valueE" );
-		}
-		CandidateRef & choice = winners.front();
-		return choice->expr;
+const ast::Expr * getValueEnumCall( const ast::Expr * expr,
+		const ResolveContext & context, const ast::TypeEnvironment & env ) {
+	auto callExpr = new ast::UntypedExpr(
+		expr->location, new ast::NameExpr( expr->location, "valueE"), {expr} );
+	CandidateFinder finder( context, env );
+	finder.find( callExpr );
+	CandidateList winners = findMinCost( finder.candidates );
+	if (winners.size() != 1) {
+		SemanticError( callExpr, "Ambiguous expression in valueE" );
+	}
+	CandidateRef & choice = winners.front();
+	return choice->expr;
 }
 
Index: src/ResolvExpr/CandidateFinder.hpp
===================================================================
--- src/ResolvExpr/CandidateFinder.hpp	(revision fb2e9169400799aaa1ef921982323d9b17c85548)
+++ src/ResolvExpr/CandidateFinder.hpp	(revision 7aa209e7409d14817d320fcccfbd6cda3e67303d)
@@ -30,10 +30,10 @@
 struct CandidateFinder {
 	CandidateList candidates;          ///< List of candidate resolutions
-	const ResolveContext & context;  ///< Information about where the canditates are being found.
+	const ResolveContext & context;    ///< Information about where the canditates are being found.
 	const ast::TypeEnvironment & env;  ///< Substitutions performed in this resolution
 	ast::ptr< ast::Type > targetType;  ///< Target type for resolution
 	bool strictMode = false;           ///< If set to true, requires targetType to be exact match (inside return cast)
 	bool allowVoid = false;            ///< If set to true, allow void-returning function calls (only top level, cast to void and first in comma)
-	std::set< std::string > otypeKeys;  /// different type may map to same key
+	std::set< std::string > otypeKeys; ///< different type may map to same key
 
 	CandidateFinder(
@@ -70,6 +70,8 @@
 	const ast::Expr * expr, Cost & cost );
 
-const ast::Expr * getValueEnumCall(const ast::Expr * expr,
-	const ResolvExpr::ResolveContext & context, const ast::TypeEnvironment & env );
+/// Get the valueE application that returns the enum's value.
+const ast::Expr * getValueEnumCall( const ast::Expr * expr,
+	const ResolveContext & context, const ast::TypeEnvironment & env );
+
 /// Wrap an expression to convert the result to a conditional result.
 const ast::Expr * createCondExpr( const ast::Expr * expr );
