https://issues.dlang.org/show_bug.cgi?id=14508
Issue ID: 14508
Summary: compiling with -unittest instantiates templates in
non-root modules
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
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.
--