Why is (int[int] s = int[int].init) not allowed

Andre Pany andre at s-e-a-p.de
Wed Dec 23 11:09:57 UTC 2020


On Wednesday, 23 December 2020 at 07:08:31 UTC, Daniel Kozak 
wrote:
> Dne st 23. 12. 2020 1:00 uživatel Steven Schveighoffer via 
> Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> napsal:
>
>> On 12/22/20 5:44 PM, Daniel Kozak wrote:
>> > [...]
>>
>> Yeah:
>>
>> void sample_valid(int[int] s = null)
>>
>> -Steve
>
>
> Yes AA.init is null per doc.
>
> https://dlang.org/spec/hash-map.html#construction_and_ref_semantic

Thanks for clarification, I was not aware that AA.init is 
technically the same as null.

Kind regards
Andre


More information about the Digitalmars-d-learn mailing list