July 09, 2013 [Issue 10584] New: Unhelpful error default constructing nested class | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=10584 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: ------- |
Copyright © 1999-2021 by the D Language Foundation