Re: Bug? opIn with associative array keyed on static arrays

2018-07-23 Thread Peter Alexander via Digitalmars-d
On Sunday, 22 July 2018 at 19:42:45 UTC, Peter Alexander wrote: void main() { int[int[1]] aa; aa[[2]] = 1; assert([2] in aa); } --- This assertion fails in 2081.1. Is this a bug? https://dpaste.dzfl.pl/d4c0d4607482 https://issues.dlang.org/show_bug.cgi?id=19112

Re: Bug? opIn with associative array keyed on static arrays

2018-07-22 Thread ag0aep6g via Digitalmars-d
On Sunday, 22 July 2018 at 19:42:45 UTC, Peter Alexander wrote: void main() { int[int[1]] aa; aa[[2]] = 1; assert([2] in aa); } --- This assertion fails in 2081.1. Is this a bug? Definitely. Looks like `[2]` makes a dynamic array (length + pointer) and `in` reinterpre

Bug? opIn with associative array keyed on static arrays

2018-07-22 Thread Peter Alexander via Digitalmars-d
void main() { int[int[1]] aa; aa[[2]] = 1; assert([2] in aa); } --- This assertion fails in 2081.1. Is this a bug? https://dpaste.dzfl.pl/d4c0d4607482