www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17580] New: Marking methods as synchronized is allowed

https://issues.dlang.org/show_bug.cgi?id=17580

          Issue ID: 17580
           Summary: Marking methods as synchronized is allowed despite
                    spec
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid, spec
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dlang-bugzilla thecybershadow.net

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() { } } --
Jul 01 2017