digitalmars.D.bugs - [Issue 14508] New: compiling with -unittest instantiates templates
- via Digitalmars-d-bugs (30/30) Apr 26 2015 https://issues.dlang.org/show_bug.cgi?id=14508
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: nobody puremagic.com Reporter: code dawg.eu 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. --
Apr 26 2015