https://issues.dlang.org/show_bug.cgi?id=13003
Issue ID: 13003
Summary: Lack of read-modify-write operation check on shared
object field
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
In git-head, issue 3672 is fixed, but its implementation is not enough.
Test case:
void main()
{
shared int n;
n++; // deprecated RMW operation
n *= 4; // deprecated RMW operation
struct S { int var; }
shared S s;
s.var++; // no deprecation
s.var -= 2; // no deprecation
}
--