Comment #0 by iamthewilsonator — 2018-11-12T00:19:14Z
see this commit[1] which worked around it
[1]:https://github.com/libmir/mir-algorithm/commit/c804962c99467168484dbf084bbe491bcd2da2a7
---
auto slice = iota(2, 3).universal.assumeContiguous;
...
- assert(slice._strides == []); // <<< Crashes
+ static assert(slice._strides.length == 0); // the workaround
---
slice._strides is an alias to the second member of a tuple, which somehow ends up wrongly having the type const(long[1]) outside of CTFE (since the static assert passes) which when compared for equality to [] (which is inferred as long[0]) fails in e2ir.d when DMD tries to optimise the comparison to a memcmp because the size of the two arrays do not match, tripping an assert[2] assert(t1.size() == t2.size()); where t1,t2 are the type of the static arrays.
[2]: https://github.com/dlang/dmd/blob/master/src/dmd/e2ir.d#L2436
Comment #1 by bugzilla — 2018-12-11T08:23:04Z
It is really helpful to have:
1. compilable examples, so it is not necessary to guess the rest
2. minimized examples that do not pull in complex templates
Comment #2 by razvan.nitu1305 — 2021-02-23T13:33:58Z
I am tempted to close this as there is no straightforward way to reproduce this. Also, when labeling an issue as a regression, the last working version should be pointed out.
Until more information is provided on this, I will downgrade its importance to normal.