On Tuesday, 29 March 2016 at 09:39:49 UTC, Walter Bright wrote:
On 3/28/2016 9:38 PM, Vladimir Panteleev wrote:
Ah, OK. Though, this is something that could be improved in
the implementation
without changing the language. DMD should not emit code that's
not called in the
module, and not callable from outside the module due to e.g.
being private.
Probably would help with template bloat, too. LTO would
probably take care of
that in theory, I wonder if LDC's or GDC's LTO doesn't have
this issue (not that
it would help testing Phobos coverage).
Or one could write unit tests specifically for the helper
functions. (I've done that.)
I've also done so in my user lib. Actually I've particpated to
this topic because of this:
https://issues.dlang.org/show_bug.cgi?id=15590
3 monthes ago I had never used D coverage feature. Initially I
thought that the coverage file was generated by static analysis
(until someone points me
https://dlang.org/phobos/core_runtime.html#.dmd_coverDestPath)...
Couldn't the coverage be done at compile time ? (even if I
directly see corner cases like functions only called by delegate)