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
Warn when passing a non-optional value to try #require(T?). (#620)
This PR adds an overload of `try #require()` that warns the developer if
they pass a non-optional, non-`Bool` value For example, this code:
```swift
let x = 0
let y = try #require(x)
```
Will produce the diagnostic:
> ⚠️ '#require(\_:\_:)' is redundant because 'x' never equals 'nil'
### 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