Bug 8212 – shared value data structures should implicitly cast to mutable

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-08T15:09:00Z
Last change time
2012-07-22T02:02:52Z
Keywords
rejects-valid
Assigned to
nobody
Creator
schveiguy

Comments

Comment #0 by schveiguy — 2012-06-08T15:09:07Z
in 2.059, this works: shared int x; void main() { int y = x; } However, this does not: struct S { int x; } shared S s; void main() { S s2 = s; } Error: cannot implicitly convert expression (s) of type shared(S) to S Clearly these are equivalent. The above code compiles fine in 2.056, but not in 2.057, so I marked this as a regression.
Comment #1 by github-bugzilla — 2012-07-22T02:02:13Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ea90073a544ba3131629f77e310658687f4f8d91 fix Issue 8212 - shared value data structures should implicitly cast to mutable