Bug 17580 – Marking methods as synchronized is allowed despite spec

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-02T00:24:09Z
Last change time
2018-07-03T15:15:52Z
Keywords
accepts-invalid, spec
Assigned to
No Owner
Creator
Vladimir Panteleev
See also
https://issues.dlang.org/show_bug.cgi?id=15563

Comments

Comment #0 by dlang-bugzilla — 2017-07-02T00:24:09Z
Spec (http://dlang.org/spec/class.html#synchronized-classes) says: > Member functions of non-synchronized classes cannot be individually marked > as synchronized. Yet this compiles: class S { synchronized void fun() { } }
Comment #1 by razvan.nitu1305 — 2018-06-04T11:46:02Z
Comment #2 by github-bugzilla — 2018-07-03T15:15:51Z
Commit pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/f295ed125c8727995e1f846bd61ae8ffb4cf56d8 Merge pull request #2404 from RazvanN7/patch-13 Fix Issue 17580 - Marking methods as synchronized is allowed despite spec merged-on-behalf-of: Jacob Carlborg <[email protected]>