http://d.puremagic.com/issues/show_bug.cgi?id=5328
Summary: The addressof-expression that should be rejected is accepted Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rayerd....@gmail.com --- Comment #0 from Haruki Shigemori <rayerd....@gmail.com> 2010-12-06 08:56:21 PST --- // a.d void f(void function() m) { m(); } class A { this() { f(&A.m); // rejects-invalid => OK } /+static+/ void m() {} } void main() { f(&A.m); // accepts-invalid => BAD!! } $ dmd a.d a.d(7): Error: function a.f (void function() m) is not callable using argument types (void delegate()) a.d(7): Error: cannot implicitly convert expression (&this.A.m) of type void delegate() to void function() You will get the following result if you remove A.this constructor. $ dmd a.d object.Error: Access Violation -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------