go embeddings and "public alias x this;" on a private member x

2013-05-26 Thread Timothee Cour
I'd like public alias x this to reset protection attribute on a (private) member x: b.d: struct B(T){ private T x;// would normally prevent alias this from doing anything useful public alias x this; } a.d: void main(){ auto a=B!int(); a++;//should do a.x++; semantic change: even t

go embeddings and "public alias x this;" on a private member x

2013-05-25 Thread timotheecour
I'd like public alias x this to reset protection attribute on a (private) member x: b.d: struct B(T){ private T x;// would normally prevent alias this from doing anything useful public alias x this; } a.d: void main(){ auto a=B!int(); a++;//should do a.x++; semantic change: ev