[Issue 7196] Unfair function address overload resolution
https://issues.dlang.org/show_bug.cgi?id=7196 Andrei Alexandrescu changed: What|Removed |Added Version|unspecified |D2 --
[Issue 7196] Unfair function address overload resolution
http://d.puremagic.com/issues/show_bug.cgi?id=7196 Kenji Hara changed: What|Removed |Added Keywords||patch, rejects-valid Platform|Other |All --- Comment #1 from Kenji Hara 2012-01-02 01:25:23 PST --- https://github.com/D-Programming-Language/dmd/pull/600 AddrExp that is yet not bounded into an variable should keep unresolved overload information. So the both lines should compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7196] Unfair function address overload resolution
http://d.puremagic.com/issues/show_bug.cgi?id=7196 Stewart Gordon changed: What|Removed |Added CC||s...@iname.com --- Comment #2 from Stewart Gordon 2012-01-02 02:43:35 PST --- This is strange - issue 52 is marked as fixed, so why does it still EVER pick the wrong instance? Where does the spec address the meaning of &foo if there's more than one function called foo in scope? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7196] Unfair function address overload resolution
http://d.puremagic.com/issues/show_bug.cgi?id=7196 --- Comment #3 from Kenji Hara 2012-01-02 03:19:13 PST --- (In reply to comment #2) > This is strange - issue 52 is marked as fixed, so why does it still EVER pick > the wrong instance? This problem is only when the caller of CallExp is AddrExp (== &foo). bug 51 is the problems on initializer and rhs of AssignExp. > Where does the spec address the meaning of &foo if there's more than one > function called foo in scope? In this case, CallExp can pick the original overload of foo in static. Therefore compiler should translate from (&foo)(arguments...) to foo(arguments...). Finally, the overload should be resolved. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7196] Unfair function address overload resolution
http://d.puremagic.com/issues/show_bug.cgi?id=7196 --- Comment #4 from timon.g...@gmx.ch 2012-01-02 11:47:18 PST --- (In reply to comment #3) > (In reply to comment #2) > > This is strange - issue 52 is marked as fixed, so why does it still EVER > > pick > > the wrong instance? > > This problem is only when the caller of CallExp is AddrExp (== &foo). > bug 51 is the problems on initializer and rhs of AssignExp. > > > Where does the spec address the meaning of &foo if there's more than one > > function called foo in scope? > > In this case, CallExp can pick the original overload of foo in static. > Therefore compiler should translate from (&foo)(arguments...) to > foo(arguments...). > Finally, the overload should be resolved. If the compiler rewrites (&foo)(arguments...) to foo(arguments...), is it now able to inline delegates that are called directly like for example {x++;}() ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7196] Unfair function address overload resolution
http://d.puremagic.com/issues/show_bug.cgi?id=7196 --- Comment #5 from Kenji Hara 2012-01-02 18:18:56 PST --- (In reply to comment #4) > If the compiler rewrites (&foo)(arguments...) to foo(arguments...), is it now > able to inline delegates that are called directly like for example {x++;}() ? Sorry, I'm not sure the meaning of 'inline'. If you means 'optimizing', I don't know direct called delegate would be inlined or not... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7196] Unfair function address overload resolution
http://d.puremagic.com/issues/show_bug.cgi?id=7196 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #6 from Walter Bright 2012-01-06 00:45:18 PST --- https://github.com/D-Programming-Language/dmd/commit/092ae010d75417a5436fd6502a024af5d21a7922 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---