Avatar
@swift-main -enable-experimental-feature TypedThrows enum FooError: Error { case foo } func throwFoo() throws(FooError) { throw .foo } func nonThrowing1() { do { try throwFoo() } catch { switch error { case .foo: break } } } func nonThrowing2() { do { try throwFoo() } catch .foo { } }