Comment #0 by dlang-bugzilla — 2024-01-23T23:07:46Z
The following function returns a different result at compile-time vs. runtime:
auto fun()
{
ubyte[1] arr = [0];
auto copy = arr;
copy[0] = 42;
return arr;
}
// E.g.
void main()
{
static ct = fun();
assert(ct == fun());
}
I think this a regression introduced in https://github.com/dlang/dmd/pull/3467.
Comment #1 by robert.schadek — 2024-12-13T19:32:46Z