Skip to content

Conversation

@j-hui
Copy link
Contributor

@j-hui j-hui commented Jan 7, 2026

This scenario happens when a derived class inherits operator[] from a base class. The derived class's operator[] is a synthesized shim, which (currently) does not have a ClangNode associated with it.

This prevents an assertion failure in SubscriptDecl::createImported().

rdar://167701851

@j-hui
Copy link
Contributor Author

j-hui commented Jan 7, 2026

@swift-ci please test

This scenario happens when a derived class inherits operator[] from
a base class. The derived class's operator[] is a synthesized shim,
which (currently) does not have a ClangNode associated with it.

This prevents an assertion failure in SubscriptDecl::createImported().

rdar://167701851
@j-hui j-hui force-pushed the inherited-subscript branch from 0632661 to 9de4cf8 Compare January 8, 2026 00:00
@j-hui
Copy link
Contributor Author

j-hui commented Jan 8, 2026

@swift-ci please test

@Xazax-hun
Copy link
Contributor

@swift-ci please test macOS

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

Thanks!

@j-hui j-hui enabled auto-merge January 8, 2026 15:07
@j-hui j-hui merged commit 3546e87 into swiftlang:main Jan 8, 2026
4 of 5 checks passed
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