Index: src/AST/Pass.hpp
===================================================================
--- src/AST/Pass.hpp	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/AST/Pass.hpp	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -252,23 +252,13 @@
 private:
 
-	__pass::result1<ast::Stmt> call_accept( const ast::Stmt * );
-	__pass::result1<ast::Expr> call_accept( const ast::Expr * );
-
-	/// This has a `type` member that is the return type for the
-	/// generic call_accept if the generic call_accept is defined.
+	/// The return type of the general call_accept function.
 	template< typename node_t >
-	using generic_call_accept_result =
-		std::enable_if<
-				!std::is_base_of<ast::Expr, node_t>::value &&
-				!std::is_base_of<ast::Stmt, node_t>::value
-			, __pass::result1<
-				typename std::remove_pointer< typename std::result_of<
-					decltype(&node_t::accept)(node_t*, type&) >::type >::type
-			>
+	using call_accept_result_t = __pass::result1<
+		typename std::remove_pointer< typename std::result_of<
+			decltype(&node_t::accept)(node_t*, type&) >::type >::type
 		>;
 
 	template< typename node_t >
-	auto call_accept( const node_t * node )
-		-> typename generic_call_accept_result<node_t>::type;
+	auto call_accept( const node_t * node ) -> call_accept_result_t<node_t>;
 
 	// requests WithStmtsToAdd directly add to this statement, as if it is a compound.
Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/AST/Pass.impl.hpp	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -109,16 +109,4 @@
 		return val;
 	}
-
-	//------------------------------
-	/// Check if value was mutated, different for pointers and containers
-	template<typename lhs_t, typename rhs_t>
-	bool differs( const lhs_t * old_val, const rhs_t * new_val ) {
-		return old_val != new_val;
-	}
-
-	template< template <class...> class container_t, typename node_t >
-	bool differs( const container_t<ast::ptr< node_t >> &, const container_t<ast::ptr< node_t >> & new_val ) {
-		return !new_val.empty();
-	}
 }
 
@@ -126,37 +114,10 @@
 template< typename node_t >
 auto ast::Pass< core_t >::call_accept( const node_t * node ) ->
-	typename ast::Pass< core_t >::template generic_call_accept_result<node_t>::type
-{
+		ast::Pass< core_t >::call_accept_result_t<node_t> {
 	__pedantic_pass_assert( __visit_children() );
 	__pedantic_pass_assert( node );
 
-	static_assert( !std::is_base_of<ast::Expr, node_t>::value, "ERROR" );
-	static_assert( !std::is_base_of<ast::Stmt, node_t>::value, "ERROR" );
-
 	auto nval = node->accept( *this );
-	__pass::result1<
-		typename std::remove_pointer< decltype( node->accept(*this) ) >::type
-	> res;
-	res.differs = nval != node;
-	res.value = nval;
-	return res;
-}
-
-template< typename core_t >
-ast::__pass::template result1<ast::Expr> ast::Pass< core_t >::call_accept( const ast::Expr * expr ) {
-	__pedantic_pass_assert( __visit_children() );
-	__pedantic_pass_assert( expr );
-
-	auto nval = expr->accept( *this );
-	return { nval != expr, nval };
-}
-
-template< typename core_t >
-ast::__pass::template result1<ast::Stmt> ast::Pass< core_t >::call_accept( const ast::Stmt * stmt ) {
-	__pedantic_pass_assert( __visit_children() );
-	__pedantic_pass_assert( stmt );
-
-	const ast::Stmt * nval = stmt->accept( *this );
-	return { nval != stmt, nval };
+	return { nval != node, nval };
 }
 
@@ -230,5 +191,5 @@
 ast::__pass::template resultNstmt<container_t> ast::Pass< core_t >::call_accept( const container_t< ptr<Stmt> > & statements ) {
 	__pedantic_pass_assert( __visit_children() );
-	if ( statements.empty() ) return {};
+	__pedantic_pass_assert( !statements.empty() );
 
 	// We are going to aggregate errors for all these statements
@@ -263,5 +224,4 @@
 			const ast::Stmt * new_stmt = stmt->accept( *this );
 			assert( new_stmt );
-			if ( new_stmt != stmt ) { new_kids.differs = true; }
 
 			// Make sure that it is either adding statements or declartions but not both
@@ -276,7 +236,8 @@
 			// Now add the statement if there is one
 			if ( new_stmt != stmt ) {
-				new_kids.values.emplace_back( new_stmt, i, false );
+				new_kids.differs = true;
+				new_kids.values.emplace_back( new_stmt );
 			} else {
-				new_kids.values.emplace_back( nullptr, i, true );
+				new_kids.values.emplace_back( i );
 			}
 
@@ -298,5 +259,7 @@
 ast::__pass::template resultN<container_t, node_t> ast::Pass< core_t >::call_accept( const container_t< ast::ptr<node_t> > & container ) {
 	__pedantic_pass_assert( __visit_children() );
-	if ( container.empty() ) return {};
+	__pedantic_pass_assert( !container.empty() );
+
+	// Collect errors from processing all these nodes.
 	SemanticErrorException errors;
 
@@ -342,11 +305,8 @@
 	static_assert( !std::is_same<const ast::Node * &, decltype(old_val)>::value, "ERROR" );
 
-	auto new_val = call_accept( old_val );
-
-	static_assert( !std::is_same<const ast::Node *, decltype(new_val)>::value /* || std::is_same<int, decltype(old_val)>::value */, "ERROR" );
-
-	if ( new_val.differs ) {
+	auto result = call_accept( old_val );
+	if ( result.differs ) {
 		auto new_parent = __pass::mutate<core_t>(parent);
-		new_val.apply(new_parent, field);
+		result.apply( new_parent, field );
 		parent = new_parent;
 	}
@@ -366,11 +326,8 @@
 	static_assert( !std::is_same<const ast::Node * &, decltype(old_val)>::value, "ERROR" );
 
-	auto new_val = call_accept_top( old_val );
-
-	static_assert( !std::is_same<const ast::Node *, decltype(new_val)>::value /* || std::is_same<int, decltype(old_val)>::value */, "ERROR" );
-
-	if ( new_val.differs ) {
+	auto result = call_accept_top( old_val );
+	if ( result.differs ) {
 		auto new_parent = __pass::mutate<core_t>(parent);
-		new_val.apply(new_parent, field);
+		result.apply( new_parent, field );
 		parent = new_parent;
 	}
@@ -390,11 +347,8 @@
 	static_assert( !std::is_same<const ast::Node * &, decltype(old_val)>::value, "ERROR" );
 
-	auto new_val = call_accept_as_compound( old_val );
-
-	static_assert( !std::is_same<const ast::Node *, decltype(new_val)>::value || std::is_same<int, decltype(old_val)>::value, "ERROR" );
-
-	if ( new_val.differs ) {
+	auto result = call_accept_as_compound( old_val );
+	if ( result.differs ) {
 		auto new_parent = __pass::mutate<core_t>(parent);
-		new_val.apply( new_parent, child );
+		result.apply( new_parent, child );
 		parent = new_parent;
 	}
@@ -452,5 +406,5 @@
 template< typename core_t >
 inline void ast::accept_all( ast::TranslationUnit & unit, ast::Pass< core_t > & visitor ) {
-	if ( auto ptr = __pass::translation_unit::get_cptr( visitor.core, 0 ) ) {
+	if ( auto ptr = __pass::translationUnit( visitor.core, 0 ) ) {
 		ValueGuard<const TranslationUnit *> guard( *ptr );
 		*ptr = &unit;
Index: src/AST/Pass.proto.hpp
===================================================================
--- src/AST/Pass.proto.hpp	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/AST/Pass.proto.hpp	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -154,6 +154,6 @@
 		bool is_old;
 
-		delta(const Stmt * s, ssize_t i, bool old) :
-			new_val(s), old_idx(i), is_old(old) {}
+		explicit delta(const Stmt * s) : new_val(s), old_idx(-1), is_old(false) {}
+		explicit delta(ssize_t i) : new_val(nullptr), old_idx(i), is_old(true) {}
 	};
 
@@ -188,5 +188,5 @@
 		std::transform( stmts->begin(), stmts->end(), std::back_inserter( values ),
 			[](ast::ptr<ast::Stmt>& stmt) -> delta {
-				return delta( stmt.release(), -1, false );
+				return delta( stmt.release() );
 			});
 		stmts->clear();
@@ -201,5 +201,5 @@
 			[](ast::ptr<ast::Decl>& decl) -> delta {
 				ast::Decl const * d = decl.release();
-				return delta( new DeclStmt( d->location, d ), -1, false );
+				return delta( new DeclStmt( d->location, d ) );
 			});
 		decls->clear();
@@ -226,50 +226,4 @@
 		// Now the original containers should still have the unchanged values
 		// but also contain the new values.
-	}
-};
-
-/// Used by previsit implementation
-/// We need to reassign the result to 'node', unless the function
-/// returns void, then we just leave 'node' unchanged
-template<bool is_void>
-struct __assign;
-
-template<>
-struct __assign<true> {
-	template<typename core_t, typename node_t>
-	static inline void result( core_t & core, const node_t * & node ) {
-		core.previsit( node );
-	}
-};
-
-template<>
-struct __assign<false> {
-	template<typename core_t, typename node_t>
-	static inline void result( core_t & core, const node_t * & node ) {
-		node = core.previsit( node );
-		assertf(node, "Previsit must not return NULL");
-	}
-};
-
-/// Used by postvisit implementation
-/// We need to return the result unless the function
-/// returns void, then we just return the original node
-template<bool is_void>
-struct __return;
-
-template<>
-struct __return<true> {
-	template<typename core_t, typename node_t>
-	static inline const node_t * result( core_t & core, const node_t * & node ) {
-		core.postvisit( node );
-		return node;
-	}
-};
-
-template<>
-struct __return<false> {
-	template<typename core_t, typename node_t>
-	static inline auto result( core_t & core, const node_t * & node ) {
-		return core.postvisit( node );
 	}
 };
@@ -297,9 +251,12 @@
 	);
 
-	__assign<
-		std::is_void<
-			decltype( core.previsit( node ) )
-		>::value
-	>::result( core, node );
+	// We need to reassign the result to 'node', unless the function
+	// returns void, then we just leave 'node' unchanged
+	if constexpr ( std::is_void_v<decltype( core.previsit( node ) )> ) {
+		core.previsit( node );
+	} else {
+		node = core.previsit( node );
+		assertf( node, "Previsit must not return nullptr." );
+	}
 }
 
@@ -312,9 +269,12 @@
 	decltype( core.postvisit( node ), node->accept( *(Visitor*)nullptr ) )
 {
-	return __return<
-		std::is_void<
-			decltype( core.postvisit( node ) )
-		>::value
-	>::result( core, node );
+	// We need to return the result unless the function
+	// returns void, then we just return the original node
+	if constexpr ( std::is_void_v<decltype( core.postvisit( node ) )> ) {
+		core.postvisit( node );
+		return node;
+	} else {
+		return core.postvisit( node );
+	}
 }
 
@@ -350,4 +310,5 @@
 FIELD_PTR( at_cleanup, __pass::at_cleanup_t )
 FIELD_PTR( visitor, ast::Pass<core_t> * const )
+FIELD_PTR( translationUnit, const TranslationUnit * )
 
 // Remove the macro to make sure we don't clash
@@ -546,18 +507,4 @@
 } // namespace forall
 
-// For passes that need access to the global context. Searches `translationUnit`
-namespace translation_unit {
-	template<typename core_t>
-	static inline auto get_cptr( core_t & core, int )
-			-> decltype( &core.translationUnit ) {
-		return &core.translationUnit;
-	}
-
-	template<typename core_t>
-	static inline const TranslationUnit ** get_cptr( core_t &, long ) {
-		return nullptr;
-	}
-}
-
 // For passes, usually utility passes, that have a result.
 namespace result {
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/Parser/StatementNode.cc	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -122,6 +122,5 @@
 	ast::Expr * cond = nullptr;
 	if ( ctl->condition ) {
-		// compare the provided condition against 0
-		cond = notZeroExpr( maybeMoveBuild( ctl->condition ) );
+		cond = maybeMoveBuild( ctl->condition );
 	} else {
 		for ( ast::ptr<ast::Stmt> & stmt : inits ) {
@@ -129,5 +128,5 @@
 			auto declStmt = stmt.strict_as<ast::DeclStmt>();
 			auto dwt = declStmt->decl.strict_as<ast::DeclWithType>();
-			ast::Expr * nze = notZeroExpr( new ast::VariableExpr( dwt->location, dwt ) );
+			ast::Expr * nze = new ast::VariableExpr( dwt->location, dwt );
 			cond = cond ? new ast::LogicalExpr( dwt->location, cond, nze, ast::AndExpr ) : nze;
 		}
@@ -200,5 +199,5 @@
 	// do-while cannot have declarations in the contitional, so init is always empty
 	return new ast::WhileDoStmt( location,
-		notZeroExpr( maybeMoveBuild( ctl ) ),
+		maybeMoveBuild( ctl ),
 		buildMoveSingle( stmt ),
 		buildMoveOptional( else_ ),
@@ -213,5 +212,5 @@
 
 	ast::Expr * astcond = nullptr;						// maybe empty
-	astcond = notZeroExpr( maybeMoveBuild( forctl->condition ) );
+	astcond = maybeMoveBuild( forctl->condition );
 
 	ast::Expr * astincr = nullptr;						// maybe empty
@@ -330,5 +329,5 @@
 	clause->target = maybeBuild( targetExpr );
 	clause->stmt = maybeMoveBuild( stmt );
-	clause->when_cond = notZeroExpr( maybeMoveBuild( when ) );
+	clause->when_cond = maybeMoveBuild( when );
 
 	ExpressionNode * next = targetExpr->next;
@@ -345,5 +344,5 @@
 ast::WaitForStmt * build_waitfor_else( const CodeLocation & location, ast::WaitForStmt * existing, ExpressionNode * when, StatementNode * stmt ) {
 	existing->else_stmt = maybeMoveBuild( stmt );
-	existing->else_cond = notZeroExpr( maybeMoveBuild( when ) );
+	existing->else_cond = maybeMoveBuild( when );
 
 	(void)location;
@@ -354,5 +353,5 @@
 	existing->timeout_time = maybeMoveBuild( timeout );
 	existing->timeout_stmt = maybeMoveBuild( stmt );
-	existing->timeout_cond = notZeroExpr( maybeMoveBuild( when ) );
+	existing->timeout_cond = maybeMoveBuild( when );
 
 	(void)location;
@@ -362,5 +361,5 @@
 ast::WaitUntilStmt::ClauseNode * build_waituntil_clause( const CodeLocation & loc, ExpressionNode * when, ExpressionNode * targetExpr, StatementNode * stmt ) {
 	ast::WhenClause * clause = new ast::WhenClause( loc );
-	clause->when_cond = notZeroExpr( maybeMoveBuild( when ) );
+	clause->when_cond = maybeMoveBuild( when );
 	clause->stmt = maybeMoveBuild( stmt );
 	clause->target = maybeMoveBuild( targetExpr );
@@ -369,5 +368,5 @@
 ast::WaitUntilStmt::ClauseNode * build_waituntil_else( const CodeLocation & loc, ExpressionNode * when, StatementNode * stmt ) {
 	ast::WhenClause * clause = new ast::WhenClause( loc );
-	clause->when_cond = notZeroExpr( maybeMoveBuild( when ) );
+	clause->when_cond = maybeMoveBuild( when );
 	clause->stmt = maybeMoveBuild( stmt );
 	return new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::ELSE, clause );
@@ -508,5 +507,5 @@
 
 	ast::Expr * astcond = nullptr;						// maybe empty
-	astcond = notZeroExpr( maybeMoveBuild( forctl->condition ) );
+	astcond = maybeMoveBuild( forctl->condition );
 
 	ast::Expr * astincr = nullptr;						// maybe empty
Index: src/Parser/module.mk
===================================================================
--- src/Parser/module.mk	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/Parser/module.mk	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -31,5 +31,4 @@
        Parser/parser.yy \
        Parser/ParserTypes.h \
-       Parser/parserutility.cc \
        Parser/parserutility.h \
        Parser/RunParser.cpp \
Index: src/Parser/parserutility.cc
===================================================================
--- src/Parser/parserutility.cc	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ 	(revision )
@@ -1,50 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// parserutility.cc --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Sat May 16 15:30:39 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Wed Mar  1 10:42:00 2023
-// Update Count     : 9
-//
-
-#include "parserutility.h"
-
-#include <list>                  // for list
-#include <string>                // for string
-
-#include "AST/Expr.hpp"          // for UntypedExpr, CastExpr, ConstantExpr
-#include "AST/Type.hpp"          // for BasicType, ZeroType, BasicType::Kind...
-
-// rewrite
-//    if ( x ) ...
-// as
-//    if ( (int)(x != 0) ) ...
-
-ast::Expr * notZeroExpr( const ast::Expr * orig ) {
-	return ( !orig ) ? nullptr : new ast::CastExpr( orig->location,
-		ast::UntypedExpr::createCall( orig->location,
-			"?!=?",
-			{
-				orig,
-				new ast::ConstantExpr( orig->location,
-					new ast::ZeroType(),
-					"0",
-					std::optional<unsigned long long>( 0 )
-				),
-			}
-		),
-		new ast::BasicType( ast::BasicType::SignedInt )
-	);
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/Parser/parserutility.h
===================================================================
--- src/Parser/parserutility.h	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/Parser/parserutility.h	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -17,9 +17,4 @@
 
 #include "AST/Copy.hpp"            // for shallowCopy
-namespace ast {
-	class Expr;
-}
-
-ast::Expr * notZeroExpr( const ast::Expr *orig );
 
 template< typename T >
Index: src/ResolvExpr/CandidateFinder.cpp
===================================================================
--- src/ResolvExpr/CandidateFinder.cpp	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/ResolvExpr/CandidateFinder.cpp	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -46,5 +46,4 @@
 #include "AST/Type.hpp"
 #include "Common/utility.h"       // for move, copy
-#include "Parser/parserutility.h" // for notZeroExpr
 #include "SymTab/Mangler.h"
 #include "Tuples/Tuples.h"        // for handleTupleAssignment
@@ -1514,10 +1513,10 @@
 	void Finder::postvisit( const ast::LogicalExpr * logicalExpr ) {
 		CandidateFinder finder1( context, tenv );
-		ast::ptr<ast::Expr> arg1 = notZeroExpr( logicalExpr->arg1 );
+		ast::ptr<ast::Expr> arg1 = createCondExpr( logicalExpr->arg1 );
 		finder1.find( arg1, ResolveMode::withAdjustment() );
 		if ( finder1.candidates.empty() ) return;
 
 		CandidateFinder finder2( context, tenv );
-		ast::ptr<ast::Expr> arg2 = notZeroExpr( logicalExpr->arg2 );
+		ast::ptr<ast::Expr> arg2 = createCondExpr( logicalExpr->arg2 );
 		finder2.find( arg2, ResolveMode::withAdjustment() );
 		if ( finder2.candidates.empty() ) return;
@@ -1545,5 +1544,5 @@
 	void Finder::postvisit( const ast::ConditionalExpr * conditionalExpr ) {
 		// candidates for condition
-		ast::ptr<ast::Expr> arg1 = notZeroExpr( conditionalExpr->arg1 );
+		ast::ptr<ast::Expr> arg1 = createCondExpr( conditionalExpr->arg1 );
 		CandidateFinder finder1( context, tenv );
 		finder1.find( arg1, ResolveMode::withAdjustment() );
@@ -2166,5 +2165,20 @@
 		CandidateRef & choice = winners.front();
 		return choice->expr;
-		// return std::move( choice->expr.get() );
+}
+
+const ast::Expr * createCondExpr( const ast::Expr * expr ) {
+	assert( expr );
+	return new ast::CastExpr( expr->location,
+		ast::UntypedExpr::createCall( expr->location,
+			"?!=?",
+			{
+				expr,
+				new ast::ConstantExpr( expr->location,
+					new ast::ZeroType(), "0", std::make_optional( 0ull )
+				),
+			}
+		),
+		new ast::BasicType( ast::BasicType::SignedInt )
+	);
 }
 
Index: src/ResolvExpr/CandidateFinder.hpp
===================================================================
--- src/ResolvExpr/CandidateFinder.hpp	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/ResolvExpr/CandidateFinder.hpp	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -72,4 +72,6 @@
 const ast::Expr * getValueEnumCall(const ast::Expr * expr,
 	const ResolvExpr::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 );
 
 } // namespace ResolvExpr
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/ResolvExpr/Resolver.cc	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -340,4 +340,12 @@
 	}
 
+	ast::ptr< ast::Expr > findCondExpression(
+		const ast::Expr * untyped, const ResolveContext & context
+	) {
+		if ( nullptr == untyped ) return untyped;
+		ast::ptr<ast::Expr> condExpr = createCondExpr( untyped );
+		return findIntegralExpression( condExpr, context );
+	}
+
 	/// check if a type is a character type
 	bool isCharType( const ast::Type * t ) {
@@ -356,5 +364,5 @@
 		return it != end;
 	}
-}
+} // anonymous namespace
 
 class Resolver final
@@ -729,10 +737,10 @@
 const ast::IfStmt * Resolver::previsit( const ast::IfStmt * ifStmt ) {
 	return ast::mutate_field(
-		ifStmt, &ast::IfStmt::cond, findIntegralExpression( ifStmt->cond, context ) );
+		ifStmt, &ast::IfStmt::cond, findCondExpression( ifStmt->cond, context ) );
 }
 
 const ast::WhileDoStmt * Resolver::previsit( const ast::WhileDoStmt * whileDoStmt ) {
 	return ast::mutate_field(
-		whileDoStmt, &ast::WhileDoStmt::cond, findIntegralExpression( whileDoStmt->cond, context ) );
+		whileDoStmt, &ast::WhileDoStmt::cond, findCondExpression( whileDoStmt->cond, context ) );
 }
 
@@ -740,5 +748,5 @@
 	if ( forStmt->cond ) {
 		forStmt = ast::mutate_field(
-			forStmt, &ast::ForStmt::cond, findIntegralExpression( forStmt->cond, context ) );
+			forStmt, &ast::ForStmt::cond, findCondExpression( forStmt->cond, context ) );
 	}
 
@@ -1075,5 +1083,5 @@
 
 		// Resolve the conditions as if it were an IfStmt, statements normally
-		clause2->when_cond = findSingleExpression( clause.when_cond, context );
+		clause2->when_cond = findCondExpression( clause.when_cond, context );
 		clause2->stmt = clause.stmt->accept( *visitor );
 
@@ -1089,5 +1097,5 @@
 			new ast::BasicType{ ast::BasicType::LongLongUnsignedInt };
 		auto timeout_time = findSingleExpression( stmt->timeout_time, target, context );
-		auto timeout_cond = findSingleExpression( stmt->timeout_cond, context );
+		auto timeout_cond = findCondExpression( stmt->timeout_cond, context );
 		auto timeout_stmt = stmt->timeout_stmt->accept( *visitor );
 
@@ -1102,5 +1110,5 @@
 	if ( stmt->else_stmt ) {
 		// resolve the condition like IfStmt, stmts normally
-		auto else_cond = findSingleExpression( stmt->else_cond, context );
+		auto else_cond = findCondExpression( stmt->else_cond, context );
 		auto else_stmt = stmt->else_stmt->accept( *visitor );
 
Index: src/Validate/ImplementEnumFunc.cpp
===================================================================
--- src/Validate/ImplementEnumFunc.cpp	(revision af746ccdf606483f8f89907b52e8b9471c72df7c)
+++ src/Validate/ImplementEnumFunc.cpp	(revision dc58e5daa87c5b617ac609696ff96cc7f4d5a5a6)
@@ -516,6 +516,5 @@
     ast::EnumInstType enumInst(enumDecl->name);
     enumInst.base = enumDecl;
-    // ast::EnumAttrType attr = ast::EnumAttrType(&enumInst);
-    // EnumAttrFuncGenerator gen(enumDecl, &enumInst functionNesting);
+
     EnumAttrFuncGenerator gen(enumDecl, &enumInst, functionNesting);
     gen.generateAndAppendFunctions(declsToAddAfter);
