Index: src/Validate/Autogen.cpp
===================================================================
--- src/Validate/Autogen.cpp	(revision 64727bd675962ce753b9ad6e433725b06b808446)
+++ src/Validate/Autogen.cpp	(revision b1e21da5ad53239136b804869f2798df7a9829e6)
@@ -321,16 +321,5 @@
 void FuncGenerator::produceDecl( const ast::FunctionDecl * decl ) {
 	assert( nullptr != decl->stmts );
-	const auto & oldParams = getGenericParams(type);
-	assert( decl->type_params.size() == oldParams.size());
-
-	/*
-	ast::DeclReplacer::TypeMap typeMap;
-	for (auto it = oldParams.begin(), jt = decl->type_params.begin(); it != oldParams.end(); ++it, ++jt) {
-		typeMap.emplace(*it, *jt);
-	}
-
-	const ast::FunctionDecl * mut = strict_dynamic_cast<const ast::FunctionDecl *>(ast::DeclReplacer::replace(decl, typeMap));
-	assert (mut == decl);
-	*/
+	assert( decl->type_params.size() == getGenericParams( type ).size() );
 
 	definitions.push_back( decl );
@@ -364,20 +353,10 @@
 	std::vector<ast::ptr<ast::TypeDecl>> type_params;
 	std::vector<ast::ptr<ast::DeclWithType>> assertions;
-
-	ast::DeclReplacer::TypeMap typeMap;
 	for ( auto & old_param : old_type_params ) {
 		ast::TypeDecl * decl = ast::deepCopy( old_param );
 		decl->init = nullptr;
 		splice( assertions, decl->assertions );
-		oldToNew.emplace( std::make_pair( old_param, decl ) );
+		oldToNew.emplace( old_param, decl );
 		type_params.push_back( decl );
-		typeMap.emplace(old_param, decl);
-	}
-
-	for (auto & param : params) {
-		param = ast::DeclReplacer::replace(param, typeMap);
-	}
-	for (auto & param : returns) {
-		param = ast::DeclReplacer::replace(param, typeMap);
 	}
 	replaceAll( params, oldToNew );
