Index: src/GenPoly/BoxNew.cpp
===================================================================
--- src/GenPoly/BoxNew.cpp	(revision d85141f3646aaab49810e9f41dfae72e33616e5d)
+++ src/GenPoly/BoxNew.cpp	(revision cbbfba90c3b1a0275f1674f8286fdc599ed15bfb)
@@ -39,25 +39,4 @@
 
 namespace {
-
-// TODO: Could this be a common helper somewhere?
-ast::FunctionType * makeFunctionType( ast::FunctionDecl const * decl ) {
-	ast::FunctionType * type = new ast::FunctionType(
-		decl->type->isVarArgs, decl->type->qualifiers
-	);
-	for ( auto type_param : decl->type_params ) {
-		type->forall.emplace_back( new ast::TypeInstType( type_param ) );
-	}
-	for ( auto assertion : decl->assertions ) {
-		type->assertions.emplace_back( new ast::VariableExpr(
-			assertion->location, assertion ) );
-	}
-	for ( auto param : decl->params ) {
-		type->params.emplace_back( param->get_type() );
-	}
-	for ( auto retval : decl->returns ) {
-		type->returns.emplace_back( retval->get_type() );
-	}
-	return type;
-}
 
 // --------------------------------------------------------------------------
@@ -1434,17 +1413,8 @@
 			layoutParams.emplace_back( alignParam );
 		}
-		// TODO: These should possibly all be gone.
-		// More all assertions into parameter list.
-		for ( ast::ptr<ast::DeclWithType> & assert : mutParam->assertions ) {
-			// Assertion parameters may not be used in body,
-			// pass along with unused attribute.
-			assert.get_and_mutate()->attributes.push_back(
-				new ast::Attribute( "unused" ) );
-			inferredParams.push_back( assert );
-		}
-		mutParam->assertions.clear();
+		// Assertions should be stored in the main list.
+		assert( mutParam->assertions.empty() );
 		typeParam = mutParam;
 	}
-	// TODO: New version of inner loop.
 	for ( ast::ptr<ast::DeclWithType> & assert : mutDecl->assertions ) {
 		// Assertion parameters may not be used in body,
@@ -1461,4 +1431,18 @@
 	spliceBegin( mutDecl->params, layoutParams );
 	addAdapters( mutDecl, localTypeVars );
+
+	// Now have to update the type to match the declaration.
+	ast::FunctionType * type = new ast::FunctionType(
+		mutDecl->type->isVarArgs, mutDecl->type->qualifiers );
+	for ( auto type_param : mutDecl->type_params ) {
+		type->forall.emplace_back( new ast::TypeInstType( type_param ) );
+	}
+	for ( auto param : mutDecl->params ) {
+		type->params.emplace_back( param->get_type() );
+	}
+	for ( auto retval : mutDecl->returns ) {
+		type->returns.emplace_back( retval->get_type() );
+	}
+	mutDecl->type = type;
 
 	return mutDecl;
@@ -1494,6 +1478,4 @@
 		}
 	}
-	// TODO: Can this be updated as we go along?
-	mutDecl->type = makeFunctionType( mutDecl );
 	return mutDecl;
 }
