https://issues.dlang.org/show_bug.cgi?id=19754 --- Comment #16 from RazvanN <razvan.nitu1305 at gmail.com> --- The root problem here is that dmd does optimizations and semantic analysis in the same pass. Will try to fix this. --