<table><tr><td style="">ematirov added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6316" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Yeah, looks like there is problem with reusing but not because of 2 runs - visitMethodDeclaration opens new declaration for type :-/<br />
See code and resulting DU-Chain: <a href="https://paste.kde.org/pmjuqk7ld" class="remarkup-link" target="_blank" rel="noreferrer">https://paste.kde.org/pmjuqk7ld</a> (declarations on lines 14 and 15)<br />
I tried to:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Assign internal context correctly;</li>
<li class="remarkup-list-item">Reuse declaration inside method declaration;</li>
<li class="remarkup-list-item">Add contexts of embedded structs as imported parent context.</li>
</ol>

<p>but now have some problems with such types as: <tt style="background: #ebebeb; font-size: 13px;">type mytype int;</tt> (some existed tests falls).  Currently I'm looking what caused it and how to fix it.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R59 KDevelop Go</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6316" rel="noreferrer">https://phabricator.kde.org/D6316</a></div></div><br /><div><strong>To: </strong>ematirov, apol, brauch<br /><strong>Cc: </strong>kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>