fix: members re-exported via using reach further derived classes - #1266
Open
gennaroprota wants to merge 1 commit into
Open
Conversation
A using-declaration is a member of the class that writes it, so a class deriving from that one inherits it. The buckets of a record tranche were inherited from a list written out by hand, and the one holding using-declarations was missing from the list, so a member re-exported from a base didn't reach classes further down the hierarchy. The buckets are discovered by reflection now, so the list cannot fall behind again. A using-declaration re-exports a name rather than a signature, so whatever a derived class declares under that name hides it. This is now checked in `inheritBaseMembers`.
✨ Highlights
🧾 Changes by Scope
🔝 Top Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1266 +/- ##
========================================
Coverage 83.12% 83.12%
========================================
Files 35 35
Lines 3662 3662
Branches 844 844
========================================
Hits 3044 3044
Misses 410 410
Partials 208 208
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
An automated preview of the documentation is available at https://1266.mrdocs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-08-27 09:13:33 UTC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a bug for which members re-exported from a base via a using-declaration appeared in the class that exported it, but non in further derived classes. For instance, in:
Midlistedsize, whileLeaflisted onlycount.Changes
BaseMemberFinalizeriterates the tranche's member buckets by reflection (rather than from a hand-written list), and suppresses an inherited using-declaration for a given name if that name is also declared normally by the derived class (name hiding).Testing
See above.
Documentation
No change needed. The documentation describes what each
inherit-base-memberssetting does with the members of a base without saying anything specific for using-declarations.