Add visit method for UnionDeclaration in transitivevisitor
UnionDeclaration should have it's own visit method because one might want to extend the transitive visitor class and override the visit method of StructDeclaration, but keep the default logic for UnionDeclaration. Without a visit method for UnionDeclaration, what would happen currently in this situation is that if you override the visit method for StructDeclaration you automatically override also the visit method for UnionDeclaration
Thanks for your pull request and interest in making D better, @lucica28! 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
Your PR doesn't reference any Bugzilla issue.
If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
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#14453"
Small suggestion, don't merge, rebase.
CI failure is because you need to update the C++ headers to match the D code. From the log:
The file
src/dmd/frontend.hseems to be out of sync. This is likely because changes were made which affect the C++ interface used by GDC and LDC.Make sure that those changes have been properly reflected in the relevant header files (e.g.
src/dmd/scope.hfor changes insrc/dmd/dscope.d).To update
frontend.hand fix this error, run the following command:
src/build.d cxx-headers-test AUTO_UPDATE=1Note that the generated code need not be valid, as the header generator (
src/dmd/dtoh.d) is still under development.To read more about
frontend.hand its usage, see src/README.md#cxx-headers-test
Small suggestion, don't merge, rebase.
thank you for the suggestion