You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---import std.concurrency;class C {}shared C instance;void main(){auto obj = initOnce!instance(new C);}---
When compiling with DMD 2.109.1 and `-preview=nosharedaccess`, results in:
/dlang/dmd/linux/bin64/../../src/phobos/std/concurrency.d(2751): Error: direct access to shared `mutex` is not allowed, see `core.atomic`
/dlang/dmd/linux/bin64/../../src/phobos/std/concurrency.d(2755): Error: direct access to shared `instance` is not allowed, see `core.atomic`
/dlang/dmd/linux/bin64/../../src/phobos/std/concurrency.d(2684): Error: template instance `std.concurrency.initOnce!(instance)` error instantiating
onlineapp.d(6): instantiated from here: `initOnce!(instance)`
The text was updated successfully, but these errors were encountered:
sludwig (@s-ludwig) reported this on 2024-11-07T10:51:58Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=24847
Description
The text was updated successfully, but these errors were encountered: