2013/2/10 Benjamin Thaut <[email protected]> > The following reduced source code would compile just fine with dmd 2.060 > but does no longer compile with dmd 2.061: > > file a.d: > module a; > > import b; > > template getType(T) > { > alias typeof(T.i) getType; > } > > void main(string[] args) > { > alias getType!Foo t; > } > > > file b.d: > module b; > > struct Foo > { > private int i; > } > > > This breaks all kind of low level functionality I did build. It breaks > both my serialization code and runtime type information system. Because in > both use cases I need to be able to access the type of a protected or > private member. > > Has this been "fixed" intentionally? Or is this a regression?
It's introduced by fixing issue 5385, so at least not a regression > If it has been "fixed" what would be a workaround to get the type of Foo.i > (outside of the b module) > You can use built-in 'tupleof' property, which still bypass access modifier. Kenji Hara
