Possible regression (2.060 -> 2.061) with member access
Benjamin Thaut
code at benjamin-thaut.de
Sat Feb 9 07:20:40 PST 2013
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? If it has
been "fixed" what would be a workaround to get the type of Foo.i
(outside of the b module) ?
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d
mailing list