[Issue 3013] Weird message with cryptic mangled name - implicit conversion error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 21 18:37:26 PDT 2009


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


ZHOU Zhenyu <rinick at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rinick at gmail.com




--- Comment #5 from ZHOU Zhenyu <rinick at 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: -------


More information about the Digitalmars-d-bugs mailing list