cat > foo.d << CODE
import bar;
CODE
cat > bar.d << CODE
struct MonoTimeImpl()
{
}
alias MonoTime = MonoTimeImpl!();
CODE
dmd -c -unittest foo
nm foo.o
----
As bar.d isn't a root module the MonoTimeImpl!() template shouldn't be instantiated. It works correctly with -O -release -inline and only fails with -unittest.
Comment #1 by dlang-bugzilla — 2015-04-27T07:15:03Z