struct A(T) { B!T fun() { return B!T.init; } } struct B(T) { private A!T _s; alias _s this; } void main() { A!(int) s; } ./test.d(15): Error: alias this there can be only one alias this ./test.d(6): Error: template instance test.B!(int) error instantiating ./test.d(15): Error: alias this there can be only one alias this
This seems to work in dmd 2.058