Avatar
Avatar
Iceman
@swift-6.0.3 -swift-version 6 func withHoge<E: Error>( _ task: () throws(E) -> () ) throws(E) { return try withFuga { try task() } } func withFuga<E: Error>( _ task: () throws(E) -> () ) throws(E) { return try task() }
exit status: 1 with <stdin>:4:16: error: thrown expression type 'any Error' cannot be converted to error type 'E' 2 | _ task: () throws(E) -> () 3 | ) throws(E) { 4 | return try withFuga { | `- error: thrown expression type 'any Error' cannot be converted to error type 'E' 5 | try task() 6 | }