I recently stumbled over bug 2962.
http://d.puremagic.com/issues/show_bug.cgi?id=2962

Now the conclusion of this is, that semantic3 on a template instance with alias parameter
must run strictly after it's instantiating parent.
The current way of adding instances back as members to their module doesn't provide this,
as modules are analyzed in cmdline order.

Proposed solution:
 - set up one array of Dsymbols
 - each template instance get appended to it
- after each semantic stage of modules the semantic for all instances is run - before generating object code the instances are added back to their module to distribute the comdats

Is it worth pursuing this approach? Would there be a better solution using existing deferring mechanisms?

see attached patch for a hacked implementation

Martin

Attachment: binwLpVWa0MU5.bin
Description: Binary data

_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to