Is there any reason why in can't work with dynamic arrays?

jmh530 john.michael.hall at gmail.com
Wed Sep 18 20:57:34 UTC 2019


On Wednesday, 18 September 2019 at 20:12:32 UTC, Adam D. Ruppe 
wrote:
> On Wednesday, 18 September 2019 at 20:07:38 UTC, jmh530 wrote:
>>> alias keys = object.keys; // also bring in the runtime [snip]
>>
>> This line doesn't compile for me.
>
> what's the error? and compiler version too

I just ran it on run.dlang.org as that is my go-to for trying any 
quick D code. It compiles with dmd-nightly, but not dmd, 
dmd-beta, ldc, ldc-beta.

https://run.dlang.io/is/fCwIIG

The error was:
onlineapp.d(11): Error: alias `onlineapp.keys` conflicts with 
template onlineapp.keys(T)(T[] t) at onlineapp.d(10)


More information about the Digitalmars-d mailing list