Avatar
Avatar
Iceman
@swift-main @swift-5.9.2 @swift-5.10.1 func f() throws -> String { "" } let _ = try switch f() { default: "" }
swift510 BOT 3/4/2024 9:03 AM
<stdin>:2:20: warning: call can throw but is not marked with 'try'; this is an error in Swift 6 let _ = try switch f() { ^~~ <stdin>:2:20: note: did you mean to use 'try'? let _ = try switch f() { ^ try <stdin>:2:20: note: did you mean to handle error as optional value? let _ = try switch f() { ^ try? <stdin>:2:20: note: did you mean to disable error propagation? let _ = try switch f() { ^ try! <stdin>:2:9: warning: 'try' has no effect on 'switch' expression let _ = try switch f() { ^~~