[Issue 4328] templated unittests fail to link when instantiated from other file if compiler order isn't correct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 27 08:39:42 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4328
--- Comment #2 from Rainer Schuetze <r.sagitario at gmx.de> 2010-08-27 08:39:32 PDT ---
Here's a workaround: similar to the assert handling, generate the unittest_fail
function whenever there is a template in the module:
Index: template.c
===================================================================
--- template.c (revision 632)
+++ template.c (working copy)
@@ -429,6 +429,13 @@
sc->module->toModuleAssert();
}
+ if (/*global.params.useUnitTests &&*/ sc->module)
+ {
+ // Generate this function as it may be used
+ // when template is instantiated in other modules
+ sc->module->toModuleUnittest();
+ }
+
/* Remember Scope for later instantiations, but make
* a copy since attributes can change.
*/
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list