http://d.puremagic.com/issues/show_bug.cgi?id=8955
Summary: Can't have qualified field with not-qualified constructor/postblit Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin....@gmail.com --- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2012-11-03 15:55:14 MSK --- Currently constructor/postblit isn't qualified (see Issue 4338 and Issue 4867). But it's violated for struct members: --- struct S { this(this) { } ~this() { } } struct S2 { S s; } const S globalS; // ok const S2 globalS2; // ok void f() { const S localS; // ok const S2 localS2; // ok } struct S3 // or class, or union { const S s; } // any qualifier causes errors --- Errors for S with postblit only: --- Error: function main.S.__postblit () is not callable using argument types () const --- Errors for S with destructor ony (note generated `opAssign`): --- Error: destructor main.S.~this () is not callable using argument types () const Error: function main.S.opAssign (S p) is not callable using argument types (const(S)) const --- Errors for S with postblit and destructor: --- Error: destructor main.S.~this () is not callable using argument types () const Error: function main.S.__postblit () is not callable using argument types () const --- There is no line numbers in errors because of Issue 8954. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------