www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14275] New: Qualified package protection for aggregate member


          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.lv

From 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