Comment #0 by iamthewilsonator — 2019-03-25T04:34:42Z
struct Foo
{
import core.thread;
pragma(mangle, Thread._locks.mangleof) extern __gshared static
typeof(Thread._locks) _locks;
}
onlineapp.d(4): Deprecation: `core.thread.Thread._locks` is not visible from module `onlineapp`
onlineapp.d(4): Error: class `core.thread.Thread` member `_locks` is not accessible
onlineapp.d(5): Deprecation: `core.thread.Thread._locks` is not visible from module `onlineapp`
onlineapp.d(5): Error: class `core.thread.Thread` member `_locks` is not accessible
the bogus is not visible can be worked around with
struct Foo
{
import core.thread;
pragma(mangle, __traits(getMember, Thread, "_locks").mangleof) extern __gshared static
typeof(__traits(getMember, Thread, "_locks")) _locks;
}
but that still gives
onlineapp.d(4): Error: class `core.thread.Thread` member `_locks` is not accessible
onlineapp.d(5): Error: class `core.thread.Thread` member `_locks` is not accessible
Comment #1 by robert.schadek — 2024-12-13T19:02:40Z