Bug 15226 – Public members being disabled for a synchronized class is undocumented

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-19T20:45:00Z
Last change time
2017-07-21T08:03:20Z
Keywords
spec
Assigned to
andrej.mitrovich
Creator
monkeyworks12

Comments

Comment #0 by monkeyworks12 — 2015-10-19T20:45:35Z
This pull[1] changed things so that public members are no longer allowed in synchronized classes. However, this change needs to be documented. 1. https://github.com/D-Programming-Language/dmd/pull/5188
Comment #1 by andrej.mitrovich — 2015-10-19T20:48:27Z
Thanks! :)
Comment #2 by monkeyworks12 — 2015-11-18T19:31:54Z
Can I close this issue? I haven't checked the documentation to see if it's been fixed.
Comment #3 by andrei — 2015-11-18T20:35:28Z
Haven't seen a related doc pull, so let's leave it open.
Comment #4 by dlang-bugzilla — 2017-07-21T08:03:20Z
(In reply to monkeyworks12 from comment #2) > Can I close this issue? I haven't checked the documentation to see if it's > been fixed. (In reply to Andrei Alexandrescu from comment #3) > Haven't seen a related doc pull, so let's leave it open. Actually, the pull request above fixed the compiler to conform to the spec (and TDPL). The spec has stated that public fields in synchronized classes are forbidden for a long time (since https://github.com/dlang/dlang.org/pull/502). See http://dlang.org/spec/class.html#synchronized-classes , which states that "Member fields of a synchronized class cannot be public". So, as far as I can see, no further change to the spec is needed.