Comment #0 by alphaglosined — 2022-05-31T00:21:43Z
```d
import std.stdio;
void main()
{
static if(0 in [0: 0]) //This expression should be true.
{
writeln(typeof(0 in [0: 0]).stringof);
}
}
```
Fails with:
onlineapp.d(5): Error: expression `&[0:0][0]` is not constant
Possibly related to https://issues.dlang.org/show_bug.cgi?id=4065
Comment #1 by destructionator — 2022-05-31T00:30:04Z
Note that
```
static if((0 in [0: 0]) !is null) //This expression should be true.
```
works fine.
Comment #2 by dfj1esp02 — 2022-05-31T10:29:42Z
Not all operators work:
static if(!(0 in [0:0])){}
Comment #3 by b2.temp — 2022-05-31T14:27:34Z
> if(!(0 in [0: 0]) !is null){}
this one does not work at run-time either
Comment #4 by robert.schadek — 2024-12-13T19:23:10Z