On 13.2.2011 19:40, Simen kjaeraas wrote:
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.
Pity. Would have been nice, now it's just one pretty useless feature at
the end of a list of features for the language.
O.