[Issue 1761] New: __traits(getVirtualFunctions, ...) doesn't give function parameter types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 1 15:06:53 PST 2008


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

           Summary: __traits(getVirtualFunctions, ...) doesn't give function
                    parameter types
           Product: D
           Version: 2.009
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: mi_emayl_adrez at hotmail.com


class C
{
   void func() {}
   void func(int a) {}
   void func(int a, int b) {}
}

void main()
{
   foreach (t; __traits(getVirtualFunctions, C, "func"))
      writefln(typeid(typeof(t)));
}

prints:
void()
void()
void()

it would be more useful if it did:
void()
void(int)
void(int, int)


-- 



More information about the Digitalmars-d-bugs mailing list