Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision 2b46a130f81bcbc59b5bc5eabf23f57941210244)
+++ src/InitTweak/FixInit.cc	(revision b287f6772aa51a3bf58157048b72a0eea9ac4e81)
@@ -131,6 +131,8 @@
 				// optimization: don't need to copy construct in order to call intrinsic functions
 				return appExpr;
-			} else if ( FunctionDecl * funcDecl = dynamic_cast< FunctionDecl * > ( function->get_var() ) ) {
-				FunctionType * ftype = funcDecl->get_functionType();
+			} else if ( DeclarationWithType * funcDecl = dynamic_cast< DeclarationWithType * > ( function->get_var() ) ) {
+				// FunctionType * ftype = funcDecl->get_functionType();
+				FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) );
+				assert( ftype );
 				if ( (funcDecl->get_name() == "?{}" || funcDecl->get_name() == "?=?") && ftype->get_parameters().size() == 2 ) {
 					Type * t1 = ftype->get_parameters().front()->get_type();
@@ -138,4 +140,5 @@
 					PointerType * ptrType = dynamic_cast< PointerType * > ( t1 );
 					assert( ptrType );
+
 					if ( ResolvExpr::typesCompatible( ptrType->get_base(), t2, SymTab::Indexer() ) ) {
 						// optimization: don't need to copy construct in order to call a copy constructor or
