<div dir="ltr">2013/2/10 Benjamin Thaut <span dir="ltr"><<a href="mailto:code@benjamin-thaut.de" target="_blank">code@benjamin-thaut.de</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
The following reduced source code would compile just fine with dmd 2.060 but does no longer compile with dmd 2.061:<br>
<br>
file a.d:<br>
module a;<br>
<br>
import b;<br>
<br>
template getType(T)<br>
{<br>
  alias typeof(T.i) getType;<br>
}<br>
<br>
void main(string[] args)<br>
{<br>
  alias getType!Foo t;<br>
}<br>
<br>
<br>
file b.d:<br>
module b;<br>
<br>
struct Foo<br>
{<br>
  private int i;<br>
}<br>
<br>
<br>
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.<br>

<br>
Has this been "fixed" intentionally? Or is this a regression?</blockquote><div><br></div><div style>It's introduced by fixing issue 5385, so at least not a regression</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
If it has been "fixed" what would be a workaround to get the type of Foo.i (outside of the b module) <br></blockquote><div><br></div><div style>You can use built-in 'tupleof' property, which still bypass access modifier. <br>
</div><div style><br></div><div style>Kenji Hara</div></div></div></div>