non-aa-initializer?

Steven Schveighoffer schveiguy at gmail.com
Fri Dec 2 18:26:36 UTC 2022


This is not an associative array initializer:

```d
['A' : ['B': 0]]
```

Yet, this is:

```d
(['A' : ['B': 0]])
```

I haven't figured out *why* this isn't a valid initializer, or why the 
parentheses are needed, but it has been this way for as far back as I 
can test on run.dlang.io.

A bug report exists on this. But any explanation of this behavior (bug 
or not) would be helpful: https://issues.dlang.org/show_bug.cgi?id=17607

-Steve


More information about the Digitalmars-d mailing list