mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Diagnose situations where pattern variables with the same name
have conflicting types:
```swift
enum E {
case a(Int)
case b(String)
}
func test(e: E) {
switch e {
case .a(let x), .b(let x): ...
}
}
```
In this example `x` is bound to `Int` and `String` at the same
time which is incorrect.
93 KiB
93 KiB