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


ZHOU Zhenyu <rin...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rin...@gmail.com




--- Comment #5 from ZHOU Zhenyu <rin...@gmail.com>  2009-05-21 18:37:25 PDT ---
(In reply to comment #4)
> (In reply to comment #1)
> > string.format("abc","abc");
> >  is same as
> > format(string, "abc", "abc");
> >  which means:
> > format(immutable(char)[], "abc", "abc");
> 
> I'm confused.  Since when has it been legal to pass a type as a function
> argument?

It's not legal. I was just explaining the error message of this bug:

> import std.string;
> 
> void main()
> {
> char[] s= string.format("abc","abc");
> }
> 
> testd.d(5): Error: cannot implicitly convert expression (format((&
> D20TypeInfo_B9AyaAyaAya6__initZ),(immutable(char)[]),
> "abc","abc")) of type immutable(char)[] to char[]

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

Reply via email to