Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 2164637ef5db4fef8aefb4475ec11f7d46cc49a9)
+++ src/GenPoly/Box.cc	(revision c81ebf924fb91ca84affb100df945a8a6441e956)
@@ -103,5 +103,5 @@
 			void passTypeVars( ApplicationExpr *appExpr, Type *polyRetType, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars );
 			/// wraps a function application with a new temporary for the out-parameter return value
-			Expression *addRetParam( ApplicationExpr *appExpr, FunctionType *function, Type *retType, std::list< Expression *>::iterator &arg );
+			Expression *addRetParam( ApplicationExpr *appExpr, Type *retType, std::list< Expression *>::iterator &arg );
 			/// Replaces all the type parameters of a generic type with their concrete equivalents under the current environment
 			void replaceParametersWithConcrete( ApplicationExpr *appExpr, std::list< Expression* >& params );
@@ -136,5 +136,5 @@
 		  public:
 			template< typename DeclClass >
-			DeclClass *handleDecl( DeclClass *decl, Type *type );
+			DeclClass *handleDecl( DeclClass *decl );
 			template< typename AggDecl >
 			AggDecl * handleAggDecl( AggDecl * aggDecl );
@@ -665,5 +665,5 @@
 		}
 
-		Expression *Pass1::addRetParam( ApplicationExpr *appExpr, FunctionType *function, Type *retType, std::list< Expression *>::iterator &arg ) {
+		Expression *Pass1::addRetParam( ApplicationExpr *appExpr, Type *retType, std::list< Expression *>::iterator &arg ) {
 			// Create temporary to hold return value of polymorphic function and produce that temporary as a result
 			// using a comma expression.
@@ -732,5 +732,5 @@
 			Type *concrete = replaceWithConcrete( appExpr, dynType );
 			// add out-parameter for return value
-			return addRetParam( appExpr, function, concrete, arg );
+			return addRetParam( appExpr, concrete, arg );
 		}
 
@@ -739,5 +739,5 @@
 //			if ( ! function->get_returnVals().empty() && isPolyType( function->get_returnVals().front()->get_type(), tyVars ) ) {
 			if ( isDynRet( function, tyVars ) ) {
-				ret = addRetParam( appExpr, function, function->get_returnVals().front()->get_type(), arg );
+				ret = addRetParam( appExpr, function->get_returnVals().front()->get_type(), arg );
 			} // if
 			std::string mangleName = mangleAdapterName( function, tyVars );
@@ -1282,5 +1282,5 @@
 
 		template< typename DeclClass >
-		DeclClass * Pass2::handleDecl( DeclClass *decl, Type *type ) {
+		DeclClass * Pass2::handleDecl( DeclClass *decl ) {
 			DeclClass *ret = static_cast< DeclClass *>( Parent::mutate( decl ) );
 
@@ -1296,5 +1296,5 @@
 
 		DeclarationWithType * Pass2::mutate( FunctionDecl *functionDecl ) {
-			functionDecl = safe_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl, functionDecl->get_functionType() ) );
+			functionDecl = safe_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl ) );
 			FunctionType * ftype = functionDecl->get_functionType();
 			if ( ! ftype->get_returnVals().empty() && functionDecl->get_statements() ) {
@@ -1321,5 +1321,5 @@
 
 		ObjectDecl * Pass2::mutate( ObjectDecl *objectDecl ) {
-			return handleDecl( objectDecl, objectDecl->get_type() );
+			return handleDecl( objectDecl );
 		}
 
@@ -1344,5 +1344,5 @@
 			addToTyVarMap( typeDecl, scopeTyVars );
 			if ( typeDecl->get_base() ) {
-				return handleDecl( typeDecl, typeDecl->get_base() );
+				return handleDecl( typeDecl );
 			} else {
 				return Parent::mutate( typeDecl );
@@ -1351,5 +1351,5 @@
 
 		TypedefDecl * Pass2::mutate( TypedefDecl *typedefDecl ) {
-			return handleDecl( typedefDecl, typedefDecl->get_base() );
+			return handleDecl( typedefDecl );
 		}
 
