Pattern matching tuple in Xcode 10.2 results in EXC_BAD_INSTRUCTION

Number:rdar://49903264 Date Originated:15-Apr-2019
Status:Open Resolved:
Product:iOS+SDK Product Version:
Classification: Reproducible:
The problem arises, when we have a case in enum with 2 or more associated values and one of them is URL or URLRequest (could not reproduce with other types). Also, we must have at least two same cases in switch which will be executed (changing `where false` to `where true` will not result in crash), and we have to refer to associated values as a tuple (`let .connectivity(value)`), not separate values (`let .connectivity(url, void)`).
Steps to reproduce:
1. Create new Xcode project for iOS.
2. Add the following func and run it (for example in AppDelegate)
    func failingFunc() {
        enum TestError {
            case connectivity(url: URL, void: Void)
        let url = URL(string: "")!
        let testError = TestError.connectivity(url: url, void: ())

        switch testError {
        case let .connectivity(value) where false:
        case .connectivity:
Expected Results:
Code runs correctly without crashes.
Actual Results:
Code crashes with EXC_BAD_INSTRUCTION.
Enabled zombies print the following: 
-[CFURL release]: message sent to deallocated instance 0x60000169e4c0
Seems like a memory issue with tuples.
Xcode 10.2, Swift 4.2 or 5.0, macOS Mojave 10.14.4
Thing to note: Xcode 10.1 works fine


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!