Olli Aalto <[email protected]> wrote:
I encountered a problem with alias this, when the aliased member is
private. I'm using the latest dmd2. It reports the follwing:
src\main.d(14): Error: struct K.K member s is not accessible
If I change the private modifier on the s member to public it works.
Is this as intended, or a bug?
This is intended. alias this (and any other alias) act as simple
rewrites to the aliased symbol, and does not change their protection
level.
I believe there is a bug on this specific issue already, and #4533[1]
certainly does describe it in general.
http://d.puremagic.com/issues/show_bug.cgi?id=4533
--
Simen