Do you remember if this bug is in Bugzilla? import std.algorithm; void main() { enum a = [3, 1, 2]; enum s = sort(a); assert(equal(a, [3, 1, 2])); assert(equal(s, [1, 2, 3])); } Bye, bearophile