So if I define an opAssign for a struct with void* as the parameter like so: struct test {void opAssign(void*mynull) {}} It works great when used in a normal assignment like so: void main () { test t = null; // compiles just fine } but refuses to compile for function parameters with default values of null like so: void tfunc(test t = null) {} // nope nope nope nope This occurs in 2.058.
It was late when I submitted this, so I wasn't thinking about what was actually going on here. The null assignment as a default parameter is treated as though it were passed as an argument which would require some way to cast implicitly.... So given that, this really becomes a feature request for implicit casting support.