On Thursday, 31 August 2017 at 14:28:57 UTC, Ali Çehreli wrote:
On 08/31/2017 01:52 AM, Nicholas Wilson wrote:I think Timon is referring to: enum int[] foo = [1,2,3]; auto bar = foo; auto baz = foo; assert(!(bar is baz)); // PassesEven better: enum int[] foo = [1,2,3]; assert(!(foo is foo)); // Passes
I guess assert(!([1,2,3] is [1,2,3]));Which is exactly what enum expands to and totally expected. Where is the surprise?
Ali
