D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16689 - Errors in instantiated mixin templates should show instantiation point
Summary: Errors in instantiated mixin templates should show instantiation point
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P5 enhancement
Assignee: No Owner
URL:
Keywords: diagnostic, pull
Depends on:
Blocks:
 
Reported: 2016-11-15 15:07 UTC by Vladimir Panteleev
Modified: 2022-09-05 21:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2016-11-15 15:07:07 UTC
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 Dlang Bot 2021-04-23 12:14:28 UTC
@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 Dlang Bot 2021-07-07 13:46:14 UTC
@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 Jan Jurzitza 2022-09-05 21:08:33 UTC
mentioned PR was merged, works on my DMD, so closing this.