Index: src/InitTweak/FixInitNew.cpp
===================================================================
--- src/InitTweak/FixInitNew.cpp	(revision eb8d7911730848b28e94420c3e942149c370232e)
+++ src/InitTweak/FixInitNew.cpp	(revision d859a304c3462b4df9c1da7c43844f9ba9c1a3f2)
@@ -14,8 +14,14 @@
 #include <utility>                     // for pair
 
+#include "AST/DeclReplacer.hpp"
+#include "AST/Expr.hpp"
 #include "AST/Inspect.hpp"             // for getFunction, getPointerBase, g...
+#include "AST/Node.hpp"
+#include "AST/Pass.hpp"
+#include "AST/Print.hpp"
+#include "AST/SymbolTable.hpp"
+#include "AST/Type.hpp"
 #include "CodeGen/GenType.h"           // for genPrettyType
 #include "CodeGen/OperatorTable.h"
-#include "Common/CodeLocationTools.hpp"
 #include "Common/PassVisitor.h"        // for PassVisitor, WithStmtsToAdd
 #include "Common/SemanticError.h"      // for SemanticError
@@ -28,4 +34,5 @@
 #include "ResolvExpr/Unify.h"          // for typesCompatible
 #include "SymTab/Autogen.h"            // for genImplicitCall
+#include "SymTab/GenImplicitCall.hpp"  // for genImplicitCall
 #include "SymTab/Indexer.h"            // for Indexer
 #include "SymTab/Mangler.h"            // for Mangler
@@ -45,12 +52,4 @@
 #include "Validate/FindSpecialDecls.h" // for dtorStmt, dtorStructDestroy
 
-#include "AST/Expr.hpp"
-#include "AST/Node.hpp"
-#include "AST/Pass.hpp"
-#include "AST/Print.hpp"
-#include "AST/SymbolTable.hpp"
-#include "AST/Type.hpp"
-#include "AST/DeclReplacer.hpp"
-
 extern bool ctordtorp; // print all debug
 extern bool ctorp; // print ctor debug
@@ -63,4 +62,42 @@
 namespace InitTweak {
 namespace {
+
+	// Shallow copy the pointer list for return.
+	std::vector<ast::ptr<ast::TypeDecl>> getGenericParams( const ast::Type * t ) {
+		if ( auto inst = dynamic_cast<const ast::StructInstType *>( t ) ) {
+			return inst->base->params;
+		}
+		if ( auto inst = dynamic_cast<const ast::UnionInstType *>( t ) ) {
+			return inst->base->params;
+		}
+		return {};
+	}
+
+	/// Given type T, generate type of default ctor/dtor, i.e. function type void (*) (T &).
+	ast::FunctionDecl * genDefaultFunc(
+			const CodeLocation loc,
+			const std::string fname,
+			const ast::Type * paramType,
+			bool maybePolymorphic = true) {
+		std::vector<ast::ptr<ast::TypeDecl>> typeParams;
+		if ( maybePolymorphic ) typeParams = getGenericParams( paramType );
+		auto dstParam = new ast::ObjectDecl( loc,
+			"_dst",
+			new ast::ReferenceType( paramType ),
+			nullptr,
+			{},
+			ast::Linkage::Cforall
+		);
+		return new ast::FunctionDecl( loc,
+			fname,
+			std::move(typeParams),
+			{dstParam},
+			{},
+			new ast::CompoundStmt(loc),
+			{},
+			ast::Linkage::Cforall
+		);
+	}
+
 	struct SelfAssignChecker {
 		void previsit( const ast::ApplicationExpr * appExpr );
@@ -121,5 +158,5 @@
 		void previsit( const ast::FunctionDecl * ) { visit_children = false; }
 
-	  protected:
+	protected:
 		ObjectSet curVars;
 	};
@@ -202,5 +239,5 @@
 
 		SemanticErrorException errors;
-	  private:
+	private:
 		template< typename... Params >
 		void emit( CodeLocation, const Params &... params );
@@ -288,5 +325,5 @@
 		static UniqueName dtorNamer( "__cleanup_dtor" );
 		std::string name = dtorNamer.newName();
-		ast::FunctionDecl * dtorFunc = SymTab::genDefaultFunc( loc, name, objDecl->type->stripReferences(), false );
+		ast::FunctionDecl * dtorFunc = genDefaultFunc( loc, name, objDecl->type->stripReferences(), false );
 		stmtsToAdd.push_back( new ast::DeclStmt(loc, dtorFunc ) );
 
@@ -1080,12 +1117,12 @@
 	void InsertDtors::previsit( const ast::BranchStmt * stmt ) {
 		switch( stmt->kind ) {
-		  case ast::BranchStmt::Continue:
-		  case ast::BranchStmt::Break:
+		case ast::BranchStmt::Continue:
+		case ast::BranchStmt::Break:
 			// could optimize the break/continue case, because the S_L-S_G check is unnecessary (this set should
 			// always be empty), but it serves as a small sanity check.
-		  case ast::BranchStmt::Goto:
+		case ast::BranchStmt::Goto:
 			handleGoto( stmt );
 			break;
-		  default:
+		default:
 			assert( false );
 		} // switch
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision eb8d7911730848b28e94420c3e942149c370232e)
+++ src/InitTweak/GenInit.cc	(revision d859a304c3462b4df9c1da7c43844f9ba9c1a3f2)
@@ -39,4 +39,5 @@
 #include "ResolvExpr/Resolver.h"
 #include "SymTab/Autogen.h"            // for genImplicitCall
+#include "SymTab/GenImplicitCall.hpp"  // for genImplicitCall
 #include "SymTab/Mangler.h"            // for Mangler
 #include "SynTree/LinkageSpec.h"       // for isOverridable, C
