[Issue 17580] New: Marking methods as synchronized is allowed despite spec
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sat Jul  1 17:24:09 PDT 2017
    
    
  
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 at puremagic.com
          Reporter: dlang-bugzilla at 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() { }
}
--
    
    
More information about the Digitalmars-d-bugs
mailing list