Bug 22137 – -preview=dip1000 enables visibility checks for tupleof

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-07-23T20:59:56Z
Last change time
2022-01-24T09:48:03Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
See also
https://issues.dlang.org/show_bug.cgi?id=18554

Comments

Comment #0 by moonlightsentinel — 2021-07-23T20:59:56Z
The following code is rejected only when compiling with -preview=dip1000: ===================================== module a; import b; void main() @safe { S s; s.tupleof[0] = 1; } ===================================== module b; struct S { private int i; } ===================================== a.d(8): Error: struct `b.S` member `i` is not accessible from `@safe` code This error is completely unrelated to DIP1000 and should be removed or replaced s.t. it triggers without -preview=dip1000.
Comment #1 by dlang-bot — 2022-01-13T10:23:59Z
@dkorpel created dlang/dmd pull request #13522 "Fix issue 22137 - -preview=dip1000 enables visibility checks for tupleof" fixing this issue: - Fix issue 22137 - -preview=dip1000 enables visibility checks for tupleof https://github.com/dlang/dmd/pull/13522
Comment #2 by dlang-bot — 2022-01-24T09:48:03Z
dlang/dmd pull request #13522 "Fix issue 22137 - -preview=dip1000 enables visibility checks for tupleof" was merged into master: - 2617c1e1a7305145304dcb5c9ba1fc2c854646d7 by dkorpel: Fix issue 22137 - -preview=dip1000 enables visibility checks for tupleof https://github.com/dlang/dmd/pull/13522