Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

Luhrel lucien.perregaux at gmail.com
Mon Jan 11 20:34:56 UTC 2021


On Monday, 11 January 2021 at 20:25:14 UTC, Luhrel wrote:
>
> Meh, gonna review my examples.
>
>
> ```
> int[] bar() { return [1,2]; }
> int[$] a6 = bar();  // conversion from int[] to int[2]
> static assert(is(typeof(a6) == int[2]));
> ```
> When manually replacing $ by 2, it now works as excepted.

In fact, this shouldn't work with my DIP. It's too much work for 
the compiler.


More information about the Digitalmars-d-announce mailing list