--------------------- import core.atomic; struct Argh { bool locked; void lock() shared { while(!cas(&locked, false, true)) { } } } --------------------- Yields: d.d(5): Error: direct access to shared `this` is not allowed, see `core.atomic`
@RazvanN7 created dlang/dmd pull request #15016 "Fix Issue 23790 - Cannot use cas on member variable with -preview=nosharedaccess" fixing this issue: - Fix Issue 23790 - Cannot use cas on member variable with -preview=nosharedaccess https://github.com/dlang/dmd/pull/15016
dlang/dmd pull request #15016 "Fix Issue 23790 - Cannot use cas on member variable with -preview=nosharedaccess" was merged into stable: - c9a887f51541d829469636b4eb13dd61cc807924 by RazvanN7: Fix Issue 23790 - Cannot use cas on member variable with -preview=nosharedaccess https://github.com/dlang/dmd/pull/15016
dlang/dmd pull request #15066 "merge stable" was merged into master: - 270845e4263b3043c444bbb3ba22d375493bf88e by Razvan Nitu: Fix Issue 23790 - Cannot use cas on member variable with -preview=nosharedaccess (#15016) https://github.com/dlang/dmd/pull/15066