https://issues.dlang.org/show_bug.cgi?id=15662
--- Comment #1 from Kenji Hara <[email protected]> --- This is expected behavior. Appending element to array would cause reallocation if there's no array.capacity. It's not related whether the appended element is unique. D's built-in array is a view of original memory. The viewed memory is not owned by the array slice, so we cannot destroy the original elements freely. Therefore, when the reallocation happens, the original elements will be copied to a newly allocated memory (its size is enough larger than the original array.length), then the old elements are copied into it _by using postblit_. Finally the unique element will be moved into the allocated room. During compilation, compiler cannot know whether the appending won't cause reallocation, so it's conservatively rejected because of @disable-d postblit. --
