<div dir="ltr">2012/12/24 Philippe Sigaud <span dir="ltr"><<a href="mailto:philippe.sigaud@gmail.com" target="_blank">philippe.sigaud@gmail.com</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">
Damn tab.<br><br><div class="gmail_quote"><div class="im">On Sun, Dec 23, 2012 at 6:48 PM, Philippe Sigaud <span dir="ltr"><<a href="mailto:philippe.sigaud@gmail.com" target="_blank">philippe.sigaud@gmail.com</a>></span> wrote:<br>
<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">
<div class="gmail_quote"><div>Kenji Hara: </div><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"><div dir="ltr">
<div class="gmail_extra"><div class="gmail_quote">
<div>T.tupleof generates a tuple of field *symbols*.</div></div></div></div></blockquote></div></div></blockquote><div><br></div><div><br></div></div><div><div>struct S</div><div>{</div><div>    int a,b,c;</div><div>}</div>
<div>void main()</div><div>{</div><div>    writeln(S.tupleof); // Error! Type S is not an expression.</div><div>}</div></div></div></blockquote><div style>[snip]</div><div><div>> That's... disturbing, or maybe I'm too tired to think straight, but why is it NOK for the former version and OK for the latter?</div>
<div class="im"></div></div><div style><br></div><div style>There seems a small diagnostic bug.</div><div style>This is:</div><div style>    writeln(S.tupleof); // Error! Type S is not an expression.<br></div><div style>Same as:</div>
<div style>    writeln(S.a, S.b, S.c);</div><div style><br></div><div style>Then all field accesses don't have correct 'this', then compilation fails.<br></div><div><br></div><div style><div>(`S.a` represents a symbol of the first field in S.</div>
<div> `s.a` represents an expression to access the first field in S, via `s`.)</div></div><div><br></div><div>Kenji Hara</div></div></div></div>