[Issue 6408] string[].init gives a wrong type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 30 13:41:27 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6408
--- Comment #5 from kennytm at gmail.com 2011-07-30 13:41:25 PDT ---
(In reply to comment #4)
> (In reply to comment #3)
>
> > You could also just add a pair of parenthesis:
> >
> > (string[]).init
> > (int[]).init
>
> This was my last example.
>
Right.
> > I'm not sure about allowing `S[].prop`. If this is allowed, we should also
> > allow `S[3].prop` and `S[T].prop` and maybe even `S*.prop`. Maybe let's have a
> > rejects-valid or enhancement request.
>
> Beside returning the correctly typed value, as alternative I accept this:
>
> string[].init
>
> to produce a syntax error that suggests the programmer to use (string[]).init
> instead. What I don't accept it silently returning a value of the "wrong" type.
I agree.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list