https://issues.dlang.org/show_bug.cgi?id=19264 --- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> --- It shouldn't matter the constancy of the original. This should also work: assert("hello".byCodeUnit == "hello".dup.byCodeUnit); --