On Wednesday, 10 September 2014 at 08:05:28 UTC, ketmar via
Digitalmars-d wrote:
yes, templates still sux (considering built-in unittests). this
is
where compiler should be fixed: it should compile unittest
invocations
only for templates that comes from the module it compiles, i
think.
That way it will be clear.
By the way, will this link?
---
template A(T)
{
int a;
unittest{ f(); }
}
version(unittest) void f(){}
---
If this module is compiled without unittests, `f` function will
not be compiled, then if another module is compiled with
unittests and instantiates the template, the template's unittest
is compiled and it will link with `f` function, which wasn't
compiled, so linking will fail?