<div dir="ltr"><div dir="ltr">On Wed, Nov 2, 2022 at 4:19 PM Alex Buckley <<a href="mailto:alex.buckley@oracle.com">alex.buckley@oracle.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">DU/DA analysis is about whether names have bindings. `x.foo` and `new <br>
C().foo` and `m().foo` are expressions, not names, so we don't attempt <br>
the analysis on them. As Jan points out [1], access via expressions is <br>
hard to track. `this.foo` is an expression, but a very easy one, so we <br>
treat it like the name `foo` and do the analysis. `A.B.C.this.foo` is an <br>
expression with a qualified-this subexpression and now you need a bunch <br>
of analysis to figure out whether it means the same as the name `foo`.<br></blockquote><div><br></div><div>Gotcha. And so my patch is therefore purporting to do "a bunch of analysis"... which of course it may very well be doing incorrectly...</div><br><div>If so I'd be interested to know that. Do you mind taking a look at <span style="font-family:monospace">TreeInfo.isThisReference()</span> to see if it looks correct?</div><div><div><br></div><div>Of course because "this" is special we don't need to do a full blown expression analysis... e.g., you can't ever say "myMethod().this" in Java.<br></div><div><br></div></div><div>Thanks,</div><div>-Archie<br></div><br></div>-- <br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>