Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 0bfaf80c317420b403ff7b65089016bc08f99922)
+++ src/GenPoly/Box.cc	(revision dbe8f244d5ddc4656e04f6da8db1d7f072f437bf)
@@ -1307,4 +1307,11 @@
 				}
 			}
+			// errors should have been caught by this point, remove initializers from parameters to allow correct codegen of default arguments
+			for ( Declaration * param : functionDecl->get_functionType()->get_parameters() ) {
+				if ( ObjectDecl * obj = dynamic_cast< ObjectDecl * >( param ) ) {
+					delete obj->get_init();
+					obj->set_init( nullptr );
+				}
+			}
 			return functionDecl;
 		}
