www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich 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: -------
Feb 13 2014
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12151


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com


--- Comment #1 from yebblies <yebblies gmail.com> 2014-02-16 02:06:52 EST ---
Along with a billion other similar rewrites.

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