digitalmars.D.bugs - [Issue 8868] New: overload resolution of &x.g() incorrectly chooses delegate over function pointer
- d-bugmail puremagic.com (30/30) Oct 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8868
- d-bugmail puremagic.com (12/12) Nov 04 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8868
http://d.puremagic.com/issues/show_bug.cgi?id=8868 Summary: overload resolution of &x.g() incorrectly chooses delegate over function pointer Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: clugdbug yahoo.com.au --- Comment #0 from Don <clugdbug yahoo.com.au> 2012-10-22 06:20:51 PDT --- ..or vice versa. Reported by kenji in the pull request for bug 8257. https://github.com/D-Programming-Language/dmd/pull/1194 ----- struct S8257 { void g(int n){} // before the static one static int g() { return 6; } } void main() { auto k = &(func()).g; pragma(msg, typeof(k)); // prints void delegate(int n) } It always chooses the first function declaration. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8868 Stewart Gordon <smjg iname.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid CC| |smjg iname.com --- Comment #1 from Stewart Gordon <smjg iname.com> 2012-11-04 16:23:54 PST --- What is 'func'? The code shouldn't compile as written. Otherwise, this looks like a case of issue 52 that the fix doesn't cover. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 04 2012