digitalmars.D.bugs - [Issue 14275] New: Qualified package protection for aggregate member
- via Digitalmars-d-bugs (39/40) Mar 10 2015 https://issues.dlang.org/show_bug.cgi?id=14275
https://issues.dlang.org/show_bug.cgi?id=14275 Issue ID: 14275 Summary: Qualified package protection for aggregate member doesn't work Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: public dicebot.lvFrom http://forum.dlang.org/post/wvfytekpmzeegeuvndqv forum.dlang.org---- module A.B.Foo; import core.stdc.stdio : printf; struct Foo { package(A) void foo() { printf("Hallo\n"); } } package(A) void bar() { printf("Hallo\n"); } ---- and ---- module A.C.Bar; import A.B.Foo; void main() { Foo f; f.foo(); bar(); } ---- The call of bar() works, but f.foo() triggers the error: Error: struct A.B.Foo.Foo member foo is not accessible --
Mar 10 2015