Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expressions > Closure Expressionに抜けている箇所がある #394

Closed
stzn opened this issue Dec 30, 2022 · 0 comments · Fixed by #395
Closed

Expressions > Closure Expressionに抜けている箇所がある #394

stzn opened this issue Dec 30, 2022 · 0 comments · Fixed by #395

Comments

@stzn
Copy link
Owner

stzn commented Dec 30, 2022

https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#ID393

Writing throws or async in a closure expression explicitly marks a closure as throwing or asynchronous.

{ (parameters) async throws -> return type in
statements
}
If the body of a closure includes a try expression, the closure is understood to be throwing. Likewise, if it includes an await expression, it’s understood to be asynchronous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant