Skip to content

Conversation

@j-hui
Copy link
Contributor

@j-hui j-hui commented Sep 23, 2025

When a derived class inherits a nested type from a base class in C++, we expect that derived type member to be the same as the base nested type. This patch fixes the ClangImporter's base member cloning to make that the case, and also fixes up some test cases (renames "sub-type" to "nested type" because the term "subtype" is overloaded and misleading here).

rdar://161137420

@j-hui
Copy link
Contributor Author

j-hui commented Sep 23, 2025

@swift-ci please test

@j-hui j-hui force-pushed the fix-inherited-nested-types branch from 5929f58 to 13529fe Compare September 23, 2025 03:07
@j-hui
Copy link
Contributor Author

j-hui commented Sep 23, 2025

@swift-ci please test

Copy link
Member

@hnrklssn hnrklssn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

When a derived class inherits a nested type from a base class in C++,
we expect that derived type member to be the same as the base nested
type. This patch fixes the ClangImporter's base member cloning to make
that the case, and also fixes up some test cases (renames "sub-type" to
"nested type" because the term "subtype" is overloaded and misleading
here).

rdar://161137420
@j-hui j-hui force-pushed the fix-inherited-nested-types branch from 13529fe to d0f14a6 Compare September 23, 2025 17:31
@j-hui
Copy link
Contributor Author

j-hui commented Sep 23, 2025

@swift-ci please smoke test

@j-hui j-hui enabled auto-merge (squash) September 23, 2025 18:23
@j-hui j-hui merged commit 563c014 into swiftlang:main Sep 23, 2025
3 checks passed
@j-hui j-hui deleted the fix-inherited-nested-types branch September 25, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants