Bug 16689 – Errors in instantiated mixin templates should show instantiation point
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P5
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-11-15T15:07:07Z
Last change time
2022-09-05T21:08:33Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Vladimir Panteleev
Comments
Comment #0 by dlang-bugzilla — 2016-11-15T15:07:07Z
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.
Comment #1 by dlang-bot — 2021-04-23T12:14:28Z
@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
Comment #2 by dlang-bot — 2021-07-07T13:46:14Z
@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
Comment #3 by d.bugs — 2022-09-05T21:08:33Z
mentioned PR was merged, works on my DMD, so closing this.