On Sunday, 25 December 2016 at 12:21:42 UTC, Stefan Koch wrote:
On Sunday, 25 December 2016 at 11:27:07 UTC, Stefan Koch wrote:
static immutable alr = arrayLiteralReturn();
static assert(alr == [1,2,3]);

There were a few problems with that.
Namely some arrays-literals would not have a length.
This is because of literals coercing to slices.
This bug is now fixed, at the expense of registering more types then is strictly necessary.
Also it creates null holes in the TypeArrays.
This may might be painful in the future.
But for now, global Array-literals work.

There are sill problems when you try to index those arrays for function calls.
This can be fixed by proving a different code-path.
If those arrays are indexed as function-parameters at the top level.

I reverted my ArrayLiteral fixes for now,
they broke the druntime build.

Reply via email to