== Quote from klickverbot (s...@klickverbot.at)'s article > On 9/7/10 11:12 PM, dsimcha wrote: > > One way to test for overriding at runtime is to compare the function > > pointer of a > > delegate obtained at runtime to the function pointer obtained from the > > compile > > time type. > That's basically the same idea I were already using, but have you tried > implementing it for overloaded functions? I have not gotten this to work > since there is seemingly no way to do &a.foo then.
All you need to do is provide an explicit type for the delegate: class A { void fun(uint num) {} void fun(float num) {} } void main() { auto a = new A; void delegate(float) funDel = &a.fun; }