digitalmars.D.bugs - [Issue 7203] New: Method pointer types differ depending on context
- d-bugmail puremagic.com (28/28) Jan 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7203
- d-bugmail puremagic.com (17/17) Jan 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7203
http://d.puremagic.com/issues/show_bug.cgi?id=7203 Summary: Method pointer types differ depending on context Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: robert octarineparrot.com --- Comment #0 from Robert Clipsham <robert octarineparrot.com> 2012-01-02 20:23:09 GMT --- 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. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 02 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7203 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-01-02 21:48:08 PST --- 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 } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 02 2012