Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 0bfaf80c317420b403ff7b65089016bc08f99922)
+++ src/GenPoly/Box.cc	(revision 97d246da445a8795c4b899478cd650136325c2ef)
@@ -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;
 		}
