[Issue 24735] Enum is not work within the member function in the synchronized class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 31 11:46:46 UTC 2024


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

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org

--- Comment #1 from Nick Treleaven <nick at geany.org> ---
> source\text.d(14,12): Error: direct access to shared `ENUM1` is not allowed, see `core.atomic`

With -preview=nosharedaccess.
Fixed by https://github.com/dlang/dmd/pull/16788

> source\text.d(27,5): Error: `shared` method `text.A.f` is not callable using a non-shared object

I think that's intentional.

--


More information about the Digitalmars-d-bugs mailing list