[Issue 17607] not an associative array initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 31 10:07:23 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17607

--- Comment #2 from Andre <andre at s-e-a-p.de> ---
(In reply to John Colvin from comment #1)
> Another simpler case of this:
> 
> struct S
> {
>     //Error: not an associative array initializer
>     D a = ["fdsa": ["fdsafd": "fdsfa"]];
> 
>     // OK
>     D b = (["fdsa": ["fdsafd": "fdsfa"]]);
> }
> 
> struct D
> {
>     this(string[string][string]) {}
> }
> 
> 
> Andre, perhaps putting brackets around it is a workaround for you as well?

thanks for the workaround. The Amazon Web Service request structures are quite
complex. They have multiple fields with multiple hierarchies. Every additional
characters makes it more difficult to read for other developers using the AWS
library. 
If the syntax could be enhanced, this would really great.

--


More information about the Digitalmars-d-bugs mailing list