<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hi, Halen. Welcome to the compiler. :-) What you're seeing is that we don't usually use C++'s normal&nbsp;<a href="https://en.wikipedia.org/wiki/Run-time_type_information" class="">RTTI</a>&nbsp;mechanism, but instead go with a "Kind" field that's checked by the custom 'cast', 'dyn_cast', and 'isa' functions. (<a href="http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates" class="">More information in the LLVM Programmer's Manual</a>.) The debugger doesn't know about this, so it just always shows the base class to be conservative. If you're debugging, you can call dump() to see what kind of Expr it really is, and then cast the pointer down to the right type as needed. In your actual code, you can check `isa&lt;ParenExpr&gt;(src)`, or `dyn_cast&lt;ParenExpr&gt;(src)` if you then need to manipulate the ParenExpr.</div><div class=""><br class=""></div><div class="">Hope that helps,</div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 6, 2017, at 15:30, Halen Wooten via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi swift devs,<br class=""><br class="">I'm working on SR-4464 to learn how to contribute to Swift. I think I<br class="">have the solution, but I'm getting unexpected results.<br class=""><br class="">I'm using the swift repl within Xcode for testing. Here's my test code.<br class=""><br class="">var name = "name"<br class="">name = (name)<br class=""><br class="">In TypeChecker::diagnoseSelfAssignment in CSDiag.cpp, the src of the<br class="">AssignExpr is a plain Expr *, but I would expect it to be a ParenExpr<br class="">*. Could someone help me figure out what's happening?<br class=""><br class="">Thanks,<br class="">Halen<br class="">_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></div></blockquote></div><br class=""></body></html>