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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Peter Alexander <[email protected]> 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: -------