Please provide a minimal reproducing testcase. Bonus points if you can make it happen in https://run.dlang.io . Also, consider following the instructions the compiler gave you that you pasted, and filing a bug via https://issues.dlang.org/enter_bug.cgi .