[Issue 7549] typeof of overloaded function picks the lexically first one

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 20 11:51:04 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=7549


Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at dawg.eu


--- Comment #5 from Martin Nowak <code at dawg.eu> 2013-05-20 11:50:59 PDT ---
This seems to happen for any type deduction.

void foo() {}
void foo(int) {}

auto val1 = &foo;                                    // should be ambiguous
auto val2 = cast(void function(int))&foo;            // works
void function(int) val3 = &foo;                      // works

auto bar1() { return &foo; }                         // should be ambiguous
auto bar2() { return cast(void function(int))&foo; } // works
void function(int) bar3() { return &foo; }           // works

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


More information about the Digitalmars-d-bugs mailing list