[swift-evolution] [Pre-proposal] Allow multiple compatible enum cases in switch cases with named variables

Stephen Celis stephen.celis at gmail.com
Fri Feb 26 08:15:38 CST 2016


> On Feb 26, 2016, at 8:54 AM, Haravikk via swift-evolution <swift-evolution at swift.org> wrote:
> 
> However, the following isn’t currently possible:
> 
> 	switch anInstanceOfFoo {
> 		case .A(let value), .B(let value):
> 			doSomethingInCommon(value)
> 	}

I believe it is possible as of 18 hours ago :)

https://github.com/apple/swift/pull/1383

Stephen


More information about the swift-evolution mailing list