class A { void foo() { pragma(msg, typeof(&A.foo).stringof); } } pragma(msg, typeof(&A.foo).stringof); This produces: ---- void function() void delegate() ---- However it should produce void function() in both cases.
In non-static member function of A, A.foo is implicitly translated to this.foo. So in function foo, typeof(&A.foo) == typeof(this.foo) and it is delegate type. class A { void foo() { A.foo(); // recursive call } }