<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 15, 2009, at 5:32 PM, Anders Carlsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 15, 2009, at 5:10 PM, Eli Friedman wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>I think the example you give isn't necessarily an error in ObjC++<br>(suppose T is an ObjC interface, and foo is a property of T).<br><br></div></blockquote><div><br></div>Good point...I'll try to come up with a better check.</div></div></blockquote></div><br><div>How about this:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(53, 89, 94); "><span style="color: #b622a3">if</span><span style="color: #000000"> (</span><span style="color: #538187">BaseType</span><span style="color: #000000">-></span>isDependentType<span style="color: #000000">()) {</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(83, 129, 135); "><span style="color: #000000">  </span><span style="color: #b622a3">const</span><span style="color: #000000"> </span>PointerType<span style="color: #000000"> *</span>PT<span style="color: #000000"> = </span>BaseType<span style="color: #000000">-></span><span style="color: #35595e">getAsPointerType</span><span style="color: #000000">();</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">  <span style="color: #b622a3">if</span> (!<span style="color: #538187">PT</span> || (<span style="color: #35595e">getLangOptions</span>().<span style="color: #538187">ObjC1</span> && </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">              !<span style="color: #538187">PT</span>-><span style="color: #35595e">getPointeeType</span>()-><span style="color: #35595e">isRecordType</span>()))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(83, 129, 135); "><span style="color: #000000">    </span><span style="color: #b622a3">return</span><span style="color: #000000"> </span><span style="color: #35595e">Owned</span><span style="color: #000000">(</span><span style="color: #b622a3">new</span><span style="color: #000000"> (</span>Context<span style="color: #000000">) </span>MemberExpr<span style="color: #000000">(</span>BaseExpr<span style="color: #000000">, </span><span style="color: #b622a3">false</span><span style="color: #000000">, </span><span style="color: #2d12d9">0</span><span style="color: #000000">,</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">                                          <span style="color: #538187">MemberLoc</span>, <span style="color: #538187">Context</span>.<span style="color: #538187">DependentTy</span>));</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div><div><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div></div><div>This passes the tests, and when compiling Obj-C++ code it doesn't give an error for</div><div><br></div><div>T t</div><div>t.f;</div><div><br></div><div>but it still gives an error for</div><div><br></div><div>this.f;</div><div><br></div><div><br></div><div>Anders</div></body></html>