http://d.puremagic.com/issues/show_bug.cgi?id=8910



--- Comment #17 from Daniel Cousens <daniel...@bigpond.com> 2012-10-30 14:21:40 
PDT ---
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #11)
> > > ...
> > >  map!(c => c[])(cs[]).join(",");
> > > ...
> > 
> > This is not valid.
> 
> Huh. So it isn't, it compiles however, just garbage output.
> What *is* it doing differently?
> 
> Also, thanks for bearing with me on this Jonathan M Davis, you're explanation
> has been a great helping in understanding the problem. :)

Right, so it is passing in a random static array of char[5] into the function,
which contains garbage.

By doing `char[] j = map!((char[] c) => c)(cs[]).join(",");`, you are forcing
the template input to be a char[], which has implicit casting, and therefore
returns a slice (note, AFAIK the second slice wasn't necessary on c).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to