www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10584] New: Unhelpful error default constructing nested class


           Summary: Unhelpful error default constructing nested class
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: peter.alexander.au gmail.com

--- Comment #0 from Peter Alexander <peter.alexander.au gmail.com> 2013-07-09
11:21:07 PDT ---
class A
    class B {}
    B b = new B();

Error: 'this' is only defined in non-static member functions, not A.

This error isn't particularly helpful, since I don't explicitly request this.
The error should state that constructing B requires a this reference, which
isn't available for default construction.

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