Comment #0 by qs.il.paperinik — 2024-05-07T12:31:21Z
Follow-up to Issue 24450
```d
foreach (int i, int x; cond() ? [1,2,3] : [1,2])
{ }
```
should likewise not be an error. The length is not known, but is bounded the same way `cond() ? 3 : 2` is bounded, and VRP detects that.
Comment #1 by nick — 2024-05-07T15:46:45Z
I tried VRP, I don't think it works for array lengths. See issue 13700.
Comment #2 by robert.schadek — 2024-12-13T19:35:10Z