[Issue 14251] New: synchronized (mtx) doesn't check attributes (pure, const)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 6 12:56:45 PST 2015


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 at puremagic.com
          Reporter: code at 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.

--


More information about the Digitalmars-d-bugs mailing list