Avatar
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 { } }
swiftNightly BOT 12/12/2023 3:37 AM
exit status: 1 with <stdin>:22:9: error: errors thrown from here are not handled because the enclosing catch is not exhaustive try throwFoo() ^
t_naruhodo 1