[Issue 12151] New: Diagnostic for .dup/.idup should emit code before the internal rewrite

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 13 07:45:55 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12151

           Summary: Diagnostic for .dup/.idup should emit code before the
                    internal rewrite
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2014-02-13 07:45:54 PST ---
void main()
{
    char[] a = "";
    char[] b = "".idup;
}

test.d(3): Error: cannot implicitly convert expression ("") of type string to
char[]
test.d(4): Error: cannot implicitly convert expression (_adDupT(typeid(string),
"")) of type string to char[]

The second line should print:

test.d(4): Error: cannot implicitly convert expression ("".idup) of type string
to char[]

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


More information about the Digitalmars-d-bugs mailing list