Assoc. Array and struct with immutable member

Alex sascha.orlov at gmail.com
Tue Apr 17 11:52:16 UTC 2018


On Tuesday, 17 April 2018 at 11:07:55 UTC, bauss wrote:
>
> Even though it works in static this, then it still looks like a 
> bug if you ask me, because the associative array itself isn't 
> immutable.

Yeah... I'm not sure, if this behavior is wanted, too...

If you argue, that an absent field in in AA is not created, then 
it is a bug.
But if you argue that after creation of the AA everything is 
created, then adding another field is equal to modifying this 
very field, and that would be correctly forbidden.

So... no clue where a hint in the docu is hidden.


More information about the Digitalmars-d-learn mailing list