tera
1
Shouldn't there be a warning here?
func foo() async -> Int {
0
}
func bar() {
Task {
await foo() // no warning here for unused result
}
}
The result of the call to foo is the return value of the closure passed to the Task initializer. This initializer is annotated with @discardableResult.
1 Like
tera
3
Indeed that was it, thank you.