On Tuesday, 7 May 2024 at 01:14:24 UTC, Steven Schveighoffer wrote:
On Tuesday, 7 May 2024 at 00:10:27 UTC, Andy Valencia wrote:
I had a set of default error messages to go with error code numbers, and did something along the lines of:

string[uint] error_text = [
    400: "A message",
    401: "A different message"
];

and got "expression .... is not a constant"
...
This was fixed [in 2.106.0](https://dlang.org/changelog/2.106.0.html#dmd.static-assoc-array)

 please upgrade your compiler.

I'm using ldc2 from Debian stable; great news that it's fixed as of late 2023. I'll probably live with my workaround, but it's good to know that it's a bug which has been resolved.

Thank you!
Andy

Reply via email to