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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 19 14:48:38 PST 2012


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

           Summary: typeof of overloaded function picks the lexically
                    first one
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2012-02-19 14:48:36 PST ---
void foo(){}
void foo(int){}

Without further information, a declaration that contains typeof(foo) should
fail.

static assert(!is({typeof(foo)* x;}));

OTOH, 'foo' has some type, we just don't know which one. 

static if(is(typeof(foo));

The simplest way to resolve this would be to define typeof(overloadset):=void.

-- 
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