Bug 19761 – cannot .mangleof or typeof() a private member.

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2019-03-25T04:34:42Z
Last change time
2024-12-13T19:02:40Z
Assigned to
No Owner
Creator
Nicholas Wilson
See also
https://issues.dlang.org/show_bug.cgi?id=15371
Moved to GitHub: dmd#19545 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19545 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB