When an error occurs in an instantiated template, DMD will show where the template was instantiated (in addition to the location of the error itself). This does not happen for mixin templates, i.e.: //////////// test.d //////////// mixin template Foo() { static assert(false, "foo"); } mixin Foo!(); //////////////////////////////// $ dmd -o- test.d test.d(3): Error: static assert "foo" DMD should also mention line 6, where the mixin template was instantiated.
@ibuclaw created dlang/dmd pull request #12463 "fix Issue 16689 - Errors in instantiated mixin templates should show instantiation point" fixing this issue: - fix Issue 16689 - Errors in instantiated mixin templates should show instantiation point https://github.com/dlang/dmd/pull/12463
@ibuclaw updated dlang/dmd pull request #12798 "Issue 21488 - Always compile dmd with -fPIC on POSIX targets" fixing this issue: - fix Issue 16689 - Errors in instantiated mixin templates should show instantiation point (#12463) https://github.com/dlang/dmd/pull/12798
mentioned PR was merged, works on my DMD, so closing this.