You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for module selectors in types during macro expansion. (#1649)
This PR modifies our code that detects types so that it correctly
handles the module selector if present. For example, we currently
misfire on a pattern like this:
```swift
try #require(throws: Swift::Never.self) {
...
}
```
We would expect to diagnose with a warning of the form:
> ⚠️ Passing 'Never.self' to 'require(\_:\_:)' is redundant; invoke
non-throwing test code directly instead
But we don't because we don't recognize that the listed error type is
equivalent to `Never`. This PR fixes that, as well as similar problems
with `Tag`, `Tag.List`, `ParallelizationTrait`, and the use of `as` in
an expectation expression.
Migrating macro expansion code of the form `Testing.T` to `Testing::T`
is a future direction.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
0 commit comments