https://issues.dlang.org/show_bug.cgi?id=22988 --- Comment #4 from Max Samukha <maxsamukha at gmail.com> --- (In reply to Max Samukha from comment #3) > enum b = l ? a[l] : 0; Should be: enum b = l ? a[l - 1] : 0; --