On 02/13/11 10:30, Olli Aalto 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? > > O. >
There is actually an alternative, but I believe I remember it being said that this would go away. In the meantime, I think it still works and maybe it could be saved. The alternative is to define a method opDot() which returns the entity to forward the call to. Check out std.typecons:Unique for an example. -- Chris N-S
