<html><head></head><body><div class="ydp41d37f12yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div><span></span><div><span>That's an awfully broad question.  I'm no expert in DMD, but I do dabble in the source code often.  <br><br>I'd start here: https://wiki.dlang.org/DMD_Source_Guide  The information there is old but still relevant.<br><br>This is my mental model and understanding<br><br>source code --> lexer.d --> tokesn<br>tokens --> parse.d --> expressions (see expression.d)<br>expressions --> expressionsem.d --> lowered expressions<br>lowered expressions --> e2ir --> intermediate representation (I'm awufully vauge on this)<br>After that it's in the backend, and that's pretty much a black box to me.<br><br>That, however, is a gross oversimplification.  If you want to browse the code that implements the semantic phase you'll want to look at any file of the form <g class="gr_ gr_24 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" id="24" data-gr-id="24">xxxsem</g>.d (e.g. dsymbolsem.d, expressionsem.d, typesem.d).  For the task at hand, issue 16486, you'll probably find the fix somewhere in there, but don't quote me on that.  Search for functions with `resolve` in the name.  Though the fix may also reside in one of the `visit` methods of one of the visitors in those files.<br><br>Tracing with `<g class="gr_ gr_22 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" id="22" data-gr-id="22">printf</g>` is your friend, which is why you see so many commented `<g class="gr_ gr_21 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="21" data-gr-id="21">printf</g>` statements in the source code.  You should be able to print out almost anything with with the `toChars()` method (e.g. `<g class="gr_ gr_23 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" id="23" data-gr-id="23">printf</g>("%s\n", whatever.toChars());`)<br><br>Mike</span><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_5182330388" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Tuesday, April 9, 2019, 9:38:25 AM GMT+9, Stefanos Baziotis via dmd-internals <dmd-internals@puremagic.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">Hi, my name is Stefanos. As part of this [1] thread, I would like<br></div><div dir="ltr">to solve issue #16486 for GSoC.<br></div><div dir="ltr">A comment from Steven Schveighoffer on the issue:<br></div><div dir="ltr">"The issue is that the compiler doesn't replace the alias until AFTER<br></div><div dir="ltr">instantiation."<br></div><div dir="ltr"><br></div><div dir="ltr">I don't know if this is the right place to ask, but could<br></div><div dir="ltr">someone help me with the understanding of semantic analysis in DMD?<br></div><div dir="ltr"><br></div><div dir="ltr">Best regards,<br></div><div dir="ltr">Stefanos Baziotis<br></div><div dir="ltr"><br></div><div dir="ltr">[1]<br></div><div dir="ltr"><a href="https://forum.dlang.org/thread/pvhacqomqgnhmqienfpi@forum.dlang.org?page=3" target="_blank">https://forum.dlang.org/thread/pvhacqomqgnhmqienfpi@forum.dlang.org?page=3</a><br></div><div dir="ltr"><br></div><div dir="ltr">_______________________________________________<br></div><div dir="ltr">dmd-internals mailing list<br></div><div dir="ltr"><a ymailto="mailto:dmd-internals@puremagic.com" href="mailto:dmd-internals@puremagic.com">dmd-internals@puremagic.com</a><br></div><div dir="ltr"><a href="http://lists.puremagic.com/mailman/listinfo/dmd-internals" target="_blank">http://lists.puremagic.com/mailman/listinfo/dmd-internals</a><br></div></div>
            </div>
        </div></body></html>