Fix Bugzilla 3538 - Default value of alias template parameter is inst…
…antiated only once
The original bug there was fixed long ago, but it was reopened with this case: https://issues.dlang.org/show_bug.cgi?id=3538#c3
@RazvanN7 suggested committing just this fix here: https://github.com/dlang/dmd/pull/13352/files/05a0dc3b4e2a35b872b8f15f59c94c1c70e64093#r794354512
Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:
- My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
- My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
- I have provided a detailed rationale explaining my changes
- New or modified functions have Ddoc comments (with
Params:andReturns:)
Please see CONTRIBUTING.md for more information.
If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.
Bugzilla references
| Auto-close | Bugzilla | Severity | Description |
|---|---|---|---|
| ✓ | 3538 | critical | Default value of alias template parameter is instantiated only once. |
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + dmd#16805"
Error, unsure if related:
failed to build 'D:\a\dmd\dmd\compiler\test\test_results\d_do_test.exe'
d_do_test-ut.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '_D3std9algorithm9searching__T8skipOverZ__TQnTAyaTQeZQxFNaNfKQpQrZb'
Update: possibly caused by https://issues.dlang.org/show_bug.cgi?id=16687
Unfortunately, it's probably related since now you are probably ending up with multiple template instances that might overlap with existing non-template function declarations... urgh...