On Tuesday, 10 February 2026 at 21:14:29 UTC, monkyyy wrote:
On Tuesday, 10 February 2026 at 20:46:11 UTC, realhet wrote:
Hi,


```d
enum int[string] foo=(){
        int[string] o;
        o["hi"]=2;
        o["bye"]=3;
        o["hi"]=4;
        return o;
}();
```

```d
static immutable foo = ["this":2, "works":3, "fine":4];
```

The problem occurs when I do it with assocArray() function and giving it the key and value ranges from an enum.

I want to automatize this dictionary because the contents of that enum will be changed/maintained later.



Reply via email to