Skip to content

Allow non-final classes to act as suites. #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jul 18, 2024

Now that we require Swift 6, we can see the names of classes during @Test macro expansion. This was the primary blocker preventing us from allowing non-final classes, because we had to substitute Self for the class name and this was invalid if the suite type could be covariant. We can drop the constraint now.

Note that test functions are not heritable.

Checklist:

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

Now that we require Swift 6, we can see the names of classes during `@Test`
macro expansion. This was the primary blocker preventing us from allowing
non-`final` classes, because we had to substitute `Self` for the class name and
this was invalid if the suite type could be covariant. We can drop the
constraint now.
@grynspan grynspan added bug 🪲 Something isn't working public-api Affects public API labels Jul 18, 2024
@grynspan grynspan self-assigned this Jul 18, 2024
@grynspan
Copy link
Contributor Author

@swift-ci please test

@briancroom
Copy link
Contributor

Nice, thank you!

@grynspan grynspan merged commit b43fae2 into main Jul 18, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/allow-non-final-classes-as-suites branch July 18, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working public-api Affects public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants