Open MichaelAdalbert opened 3 months ago
Hey @AnthonyLatsis
I'm a Swift Mentorship Mentee looking for a good first bug to work on. Would it be okay if I start working on this issue? If you have any recommendations or could tag me in any other suitable issues as you're triaging new ones, that would be greatly appreciated! Also, I had a discussion with amritpan. Could you please guide me on whether this issue would require minor changes or if it would need any pitches?
@GunjanRawat26 Hi! I am not even sure we want to do this one. Definitely subject to discussion and not a minor change at that. For alternatives, I think that many of the good first issues labeled with https://github.com/swiftlang/swift/labels/diagnostics%20QoI are a great starting point. These are often more about collaborating, exercising your understanding of the language, and reflecting on your experience as a Swift user than coding.
Motivation
In Swift, when using ranges within a switch statement, an error is raised even if the ranges cover all possible cases. Consider the following example:
To resolve this issue, a default case must be added:
However, this addition is redundant since all possible cases are already covered by the first two branches.
Proposed solution
The solution is as follows:
Alternatives considered
No response
Additional information
No response