<div dir="ltr">2013/4/10 Dicebot <span dir="ltr"><<a href="mailto:m.strashun@gmail.com" target="_blank">m.strashun@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Wednesday, 10 April 2013 at 09:37:44 UTC, kenji hara wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
OK. I don't understand the issue enough, but I'd like to help you.<br>
<br>
- TemplateInstance::tinst may represent the enclosing template instance<br>
that 'this' instance is instantiated. It is set in<br>
TemplateInstance::semantic(|2|<u></u>3) for its member's semantic process.<br>
<br>
- TemplateInstance::enclosing may represent the parent of nested template<br>
instance. If a template is instantiated in function scope with implicit<br>
context, it points the function. It is set in<br>
TemplateInstance::<u></u>hasNestedArgs.<br>
<br>
- Module::importedFrom may represents the "root module" of import chain. it<br>
points one of the module that listed in command line.<br>
<br>
Good luck.<br>
<br>
Kenji Hara<br>
</blockquote>
<br></div>
I see no TemplateInstance::enclosing, only Scope::enclosing and TemplateInstance is not Scope descendant.</blockquote><div><br></div><div style>Very recently TemplateInstance::isnested is renamed to TemplateInstance::enclosing.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Essentially I need to emit symbols not for "importedFrom" module but for module of top-most tinst in chain. I supposed that iterating tinst can do the trick, but it is not. For example, when map is used, it call templated range functions somewhere down the line and iterating up from those don't get you initial map call scope. (Same issue in printInstantiationTrace as it uses this method).<br>
</blockquote><div><br></div><div style>It sounds that using TemplateInstance::enclosing is correct.</div><div style><br></div><div style>Kenji Hara</div></div></div></div>