Skip to content

Conversation

@grynspan
Copy link
Contributor

@grynspan grynspan commented Jul 24, 2025

To determine if a class is a subclass of another, we can use T.self is U.Type in an implicitly-opened existential context. Prior to the Swift 6 language mode, type existentials weren't openable, so we had to recursively call a runtime function to check this. That's no longer a concern for us.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

To determine if a class is a subclass of another, we can use `T.self is U.Type`
in an implicitly-opened existential context. Prior to the Swift 6 language mode,
type existentials weren't openable, so we had to recursively call a runtime
function to check this. That's no longer a concern for us.
@grynspan grynspan added this to the Swift 6.x (main) milestone Jul 24, 2025
@grynspan grynspan self-assigned this Jul 24, 2025
@grynspan grynspan added the bug 🪲 Something isn't working label Jul 24, 2025
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan added tech-debt 💾 reduces technical debt and removed bug 🪲 Something isn't working labels Jul 24, 2025
@grynspan grynspan merged commit 0f809e4 into main Jul 24, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/no-_getSuperclass branch July 24, 2025 20:00
@briancroom
Copy link
Contributor

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tech-debt 💾 reduces technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants