Comment #0 by mi_emayl_adrez — 2008-01-01T17:06:51Z
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)
Comment #1 by smjg — 2008-09-09T15:58:08Z
It's not a problem with traits, it's a problem with the TypeInfo for functions/delegates.
Comment #2 by lucia.mcojocaru — 2016-11-13T10:21:22Z