Bug 12151 – Diagnostic for .dup/.idup should emit code before the internal rewrite
Status
RESOLVED
Resolution
WORKSFORME
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-13T07:45:00Z
Last change time
2014-04-21T20:14:50Z
Keywords
diagnostic
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2014-02-13T07:45:54Z
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[]
Comment #1 by yebblies — 2014-02-15T07:06:52Z
Along with a billion other similar rewrites.
Comment #2 by andrej.mitrovich — 2014-04-21T20:14:50Z