[Issue 9403] New: Implicit conversion from char[N] to string with templated functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 26 06:51:46 PST 2013


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

           Summary: Implicit conversion from char[N] to string with
                    templated functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2013-01-26 16:51:45 EET ---
The following unittest compiles and fails, but shouldn't compile:

char[4] f()() { char[4] buf; buf[] = "Drox"; return buf; }
string g() { return f(); }
unittest { assert(g() == "Drox"); }

May be related to issue 9402.

-- 
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