Re: Why do array literals default to object.Object[]?

2017-07-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/12/17 1:24 AM, Brandon Buck wrote: On Wednesday, 12 July 2017 at 02:06:41 UTC, Steven Schveighoffer wrote: I'm sure there's a bug filed somewhere on this... Is this bug worthy? I can search for one and comment and/or create one if I can't find one. Found it. It was mistakenly closed:

Re: Why do array literals default to object.Object[]?

2017-07-13 Thread Moritz Maxeiner via Digitalmars-d-learn
On Wednesday, 12 July 2017 at 05:24:49 UTC, Brandon Buck wrote: On Wednesday, 12 July 2017 at 02:06:41 UTC, Steven Schveighoffer wrote: I'm sure there's a bug filed somewhere on this... Is this bug worthy? I can search for one and comment and/or create one if I can't find one. It's at

Re: Why do array literals default to object.Object[]?

2017-07-11 Thread Brandon Buck via Digitalmars-d-learn
On Wednesday, 12 July 2017 at 02:06:41 UTC, Steven Schveighoffer wrote: I do agree it's not intuitive for an initializer, especially when: auto a = [1, 2, 3]; // typeof(a) == int[] short[] b = [1, 2, 3]; // works Thank you for getting back to me, that's where my train of thought was going.

Re: Why do array literals default to object.Object[]?

2017-07-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/11/17 9:27 PM, Brandon Buck wrote: I apologize if this has been touched on before, I'm not quite sure what to search for and what I did try didn't bring anything up. Okay, so I'm learning D, using the D Tour flow and I went over interfaces. Everything is making sense. I key in the

Why do array literals default to object.Object[]?

2017-07-11 Thread Brandon Buck via Digitalmars-d-learn
I apologize if this has been touched on before, I'm not quite sure what to search for and what I did try didn't bring anything up. Okay, so I'm learning D, using the D Tour flow and I went over interfaces. Everything is making sense. I key in the example (as I like to copy it by hand and