Bug 5917 – DMD gets tripped up by immutable struct members when struct contains postblit

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2011-05-01T19:26:00Z
Last change time
2011-05-01T23:32:49Z
Assigned to
nobody
Creator
ultimatemacfanatic

Attachments

IDFilenameSummaryContent-TypeSize
957bitset.dD file to trigger the bugtext/plain90

Comments

Comment #0 by ultimatemacfanatic — 2011-05-01T19:26:14Z
output from compiler is this: Desktop: myloginname$ dmd2 -c bitset.d Error: this is not mutable Error: this is not mutable Error: this is not mutable Desktop: myloginname$ When I delete the "immutable" keyword, then it compiles fine. Here is the input file cut down to just the bare bones of what's needed to trigger the buggy behavior: /* start of file */ struct bitset { private immutable uint _length; this(this) { } } /* end of file */ Attached is the full file, with everything that it was meant to be used with. It's a port of some Python interpreter source code to D.
Comment #1 by ultimatemacfanatic — 2011-05-01T19:29:00Z
Created attachment 957 D file to trigger the bug
Comment #2 by kennytm — 2011-05-01T23:32:49Z
*** This issue has been marked as a duplicate of issue 5314 ***