digitalmars.D.bugs - [Issue 10020] New: Error: cannot modify struct this Slot with immutable members
- d-bugmail puremagic.com (47/47) May 03 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10020
- d-bugmail puremagic.com (25/25) May 03 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10020
- d-bugmail puremagic.com (10/31) May 03 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10020
- d-bugmail puremagic.com (14/14) May 03 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10020
http://d.puremagic.com/issues/show_bug.cgi?id=10020 Summary: Error: cannot modify struct this Slot with immutable members Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: jens.k.mueller gmx.de The following code produces the compiler error "Error: cannot modify struct this Slot with immutable members". I compiled using dmd v2.062 on Linux with "dmd file.d". I expected a proper diagnostics message on how to fix the problem or what's the root of the problem. Note, there are no line numbers. file test.d --- struct StructA { // commenting out postblit makes the error go away this(this) inout { } } struct StructB { // commenting out opEquals makes the error go away bool opEquals()(auto ref const StructB rhs) const { return true; } } struct StructC { StructA[int] _structA; // commenting out this makes the error go away StructB _structB; // commenting out this makes the error go away } void main(){} --- Besides improving the compiler diagnostics it is also helpful to understand the issue. I assume it's some const problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 03 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10020 Maxim Fomin <maxim maxim-fomin.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim maxim-fomin.ru --- Yes, this is known issue and was reported several times. Error message is correct and refers to AA druntime implementation opaque data structure which is hidden from user. Root case (plus variations with inout, opEquals, AA arrays, etc...): struct S { this(this){} } struct SS { const S s; } void main() { } I think diagnostic shouldn't be fixed here because it is a design problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 03 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10020Yes, this is known issue and was reported several times. Error message is correct and refers to AA druntime implementation opaque data structure which is hidden from user. Root case (plus variations with inout, opEquals, AA arrays, etc...): struct S { this(this){} } struct SS { const S s; } void main() { } I think diagnostic shouldn't be fixed here because it is a design problem.Many thanks for the prompt reply. Can you make this report a duplicate then? I haven't found related issues. The problem is then the AA implementation, right? Any schedule on when it will be fixed? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 03 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10020 Maxim Fomin <maxim maxim-fomin.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|NEW |RESOLVED Resolution| |DUPLICATE --- Marked as duplicate. After lurking through bugzilla search I found many issues close to this one, but 8954 seems the most relevant. *** This issue has been marked as a duplicate of issue 8954 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 03 2013