https://issues.dlang.org/show_bug.cgi?id=23773 --- Comment #5 from RazvanN <razvan.nitu1305 at gmail.com> --- Well, the compiler rewrites `a.length = i` to `_d_arraysetlengthT(a, i)` so that's why the assert error is not caught. --