Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Sep 25, 2025

This PR adopts generics instead of existentials when declaring suite types in the expansions of @Suite and @Test and in the interface of the internal TypeInfo helper type.

Checklist:

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

This PR adopts generics instead of existentials when declaring suite types in
the expansions of `@Suite` and `@Test` and in the interface of the internal
`TypeInfo` helper type.
@grynspan grynspan added this to the Swift 6.x (main) milestone Sep 25, 2025
@grynspan grynspan self-assigned this Sep 25, 2025
@grynspan grynspan added enhancement New feature or request embedded-swift 📟 Embedded Swift issues macros 🔭 Related to Swift macros such as @Test or #expect labels Sep 25, 2025
public static func __function<S>(
named testFunctionName: String,
in containingType: (any ~Copyable.Type)?,
in containingType: S.Type?,
Copy link
Contributor

Choose a reason for hiding this comment

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

S here is a shorthand for Suite?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. As a bad habit from C++, I tend to spell my generic types with one letter unless it's ambiguous.

@grynspan grynspan merged commit cbafbcd into main Sep 25, 2025
24 checks passed
@grynspan grynspan deleted the jgrynspan/generic-suite-type branch September 25, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded-swift 📟 Embedded Swift issues enhancement New feature or request macros 🔭 Related to Swift macros such as @Test or #expect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants