[Issue 14251] synchronized (mtx) doesn't check attributes (pure, const)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Mar 22 09:30:35 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=14251
Johan Engelen <jbc.engelen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jbc.engelen at gmail.com
--- Comment #1 from Johan Engelen <jbc.engelen at gmail.com> ---
Another effect of the missing semantic on _d_monitorenter/exit is that this
code compiles while I think it shouldn't (_d_monitorenter/exit will write to
klass.__monitor):
void foo() {
immutable Klass klass = new Klass;
synchronized (klass)
{
// do smth
}
}
--
More information about the Digitalmars-d-bugs
mailing list