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