Remaining Travis merge-2.064 failure

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Jun 10 05:09:41 PDT 2014


Hi Christian,

On 9 Jun 2014, at 18:28, Christian Kamm via digitalmars-d-ldc wrote:
> I'll make a pull request to fix it.

Yes, that would be great.

> Okay. Aside: how does it deal with cycles? Wouldn't no instance be
> emitted if two modules both instantiate the same function and include
> each other? (in practice both were emitted for me)

If ti->instantiatingModule (the module you would like to pull the symbol 
in from) itself also imports at least one of the root modules, then 
importsRoot will be true, and the symbol will still be defined. Exactly 
the same situation will occur (with m/mi swapped) when building what 
currently is ti->instantiatingModule, so you end up emitting that 
template into both modules, as you observed.

On a somewhat unrelated note, the use of "insearch" in that piece of 
code is a beautiful example of DMD's … uhm … pasta-inspired design.

Best,
David


More information about the digitalmars-d-ldc mailing list