Index: src/Validate/Autogen.cpp
===================================================================
--- src/Validate/Autogen.cpp	(revision 496ffc17cf8822f6bee4aed86e97230a1b3a0776)
+++ src/Validate/Autogen.cpp	(revision 020fa100c9bc0916e08b181151ef5bacc4b91f0f)
@@ -198,5 +198,4 @@
 	bool shouldAutogen() const final { return true; }
 	void genAttrFuncForward();
-	void __attribute__ ((unused)) genDualFuncs();
 private:
 	void genFuncBody( ast::FunctionDecl * decl ) final;
@@ -204,14 +203,7 @@
 	const ast::Decl * getDecl() const final { return decl; }
 
-	ast::ObjectDecl * dualDstParam() const;
-
 	ast::FunctionDecl * genPosProto() const;
 	ast::FunctionDecl * genLabelProto() const;
 	ast::FunctionDecl * genValueProto() const;
-
-	ast::FunctionDecl * genCopyEnumToDualProto() const;
-	ast::FunctionDecl * genAssignEnumToDualProto() const;
-
-	void genDualBody( ast::FunctionDecl * decl );
 };
 
@@ -258,5 +250,4 @@
 	if ( enumDecl->base ) {
 		gen.genAttrFuncForward();
-		// gen.genDualFuncs();
 	}
 	gen.generateAndAppendFunctions( declsToAddAfter );
@@ -810,62 +801,4 @@
 }
 
-ast::ObjectDecl * EnumFuncGenerator::dualDstParam() const {
-	auto base = decl->base;
-	assert( base );
-	return new ast::ObjectDecl( getLocation(), "_dst",
-		new ast::ReferenceType( ast::deepCopy( base ) ) );
-}
-
-// void ?{}(T & _dst, enum E _src )
-ast::FunctionDecl * EnumFuncGenerator::genCopyEnumToDualProto() const {
-	return genProto( "?{}", { dualDstParam(), srcParam() }, {} );
-}
-
-// T ?{}(T & _dst, enum E _src )
-ast::FunctionDecl * EnumFuncGenerator::genAssignEnumToDualProto() const {
-	auto retval = dualDstParam();
-	retval->name = "_ret";
-	return genProto( "?=?", { dualDstParam(), srcParam() }, { retval });
-}
-
-void EnumFuncGenerator::genDualBody( ast::FunctionDecl * functionDecl ) {
-	assert( decl->base );
-	const CodeLocation& location = functionDecl->location;
-	auto & params = functionDecl->params;
-	
-	assert( 2 == params.size() );
-	auto dstParam = params.front().strict_as<ast::ObjectDecl>();
-	auto srcParam = params.back().strict_as<ast::ObjectDecl>();
-
-	auto dstExpr = new ast::VariableExpr( location, dstParam );
-
-	auto srcExpr = new ast::ApplicationExpr( location,
-		ast::VariableExpr::functionPointer( location, genValueProto() ),
-		{
-			new ast::VariableExpr( location, srcParam )
-		});
-	auto callExpr = new ast::ApplicationExpr( location,
-		ast::VariableExpr::functionPointer( location, functionDecl ),
-		{ dstExpr, srcExpr } );
-	functionDecl->stmts = new ast::CompoundStmt( location,
-		{ new ast::ExprStmt( location, callExpr)} );
-}
-
-void EnumFuncGenerator::genDualFuncs() {
-	assert( decl->base );
-	ast::FunctionDecl *(EnumFuncGenerator::*dualProtos[2])() const = {
-			&EnumFuncGenerator::genCopyEnumToDualProto, 
-			&EnumFuncGenerator::genAssignEnumToDualProto };
-	for ( auto & generator : dualProtos ) {
-		ast::FunctionDecl * decl = (this->*generator)();
-		produceForwardDecl( decl );
-		genDualBody( decl );
-		if ( CodeGen::isAssignment( decl->name ) ) {
-			appendReturnThis( decl );
-		}
-		produceDecl( decl );
-	}
-}
-
 void TypeFuncGenerator::genFieldCtors() {
 	// Opaque types do not have field constructors.
