Summary: The addressof-expression that should be rejected is
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Haruki Shigemori <> 2010-12-06 08:56:21 
PST ---
// a.d
void f(void function() m) { m(); }

class A
        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:
------- You are receiving this mail because: -------

Reply via email to