Check for duplicated AA keys at compile time
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jun 3 09:02:41 PDT 2017
On Saturday, 3 June 2017 at 14:59:38 UTC, Jacob Carlborg wrote:
> Would it be reasonable for the compiler to check for duplicated
> keys in an associative array literal where all the keys are
> known at compile time? For example:
>
> auto aa = ["foo": 1, "foo": 1];
You can write one yourself as soon as newCTFE supports it :)
More information about the Digitalmars-d
mailing list