http://d.puremagic.com/issues/show_bug.cgi?id=4838

           Summary: Cannot declare a delegate variable for const member
                    functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: c...@klickverbot.at


--- Comment #0 from klickverbot <c...@klickverbot.at> 2010-09-07 15:38:30 PDT 
---
Given �class A { void foo() const {} }; A a = new A;�,
�typeof(&a.foo).stringof� yields �void delegate() const�.

However, trying to declare a delegate variable of this type like �void
delegate() const dg; dg = &a.foo;� fails with �const/immutable/shared/inout
attributes are only valid for non-static member functions� or, depending on the
scope one tries to declare the variable in, even more cryptic error messages.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to