June 23, 2004 Bug with 'in' with associative array | ||||
---|---|---|---|---|
| ||||
This code fails the assert:
> class x {}
> int[x[]] foo;
> int main() {
> x[] key = new x[1];
> foo[key] = 0;
> assert(key in foo);
> return 0;
> }
I went back and tested this snippet on 0.92, and it segfaults (every time I run it) rather than asserts. However, on my larger program (where I first found this bug), it used to only segfault sometimes. Most of the time it used to work.
|
Copyright © 1999-2021 by the D Language Foundation