www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14251] New: synchronized (mtx) doesn't check attributes

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

          Issue ID: 14251
           Summary: synchronized (mtx) doesn't check attributes (pure,
                    const)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

It's possible to run `synchronized (mtx)` in a `pure const` function even
though neither of both attributes apply.
This happens because the compiler doesn't run semantic on the
_d_monitorenter/exit function calls.

--
Mar 06 2015