Skip to content

[SE-0413] Adopt typed throws in withoutActuallyEscaping(_:do:) #70913

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

Merged

Conversation

DougGregor
Copy link
Member

There is a small bug fix here in the identification of the catch node, where the leading { of a closure was considered to be "inside" the closure for code like

{ ... }()

causing us to assume that the call to the closure would catch the error within the closure.

Other than that, introduce the thrown error type into the type checker's modeling of withoutActuallyEscaping(_:do:), and mirror that in the library declaration.

There is a small bug fix here in the identification of the catch node,
where the leading `{` of a closure was considered to be "inside" the
closure for code like

    { ... }()

causing us to assume that the call to the closure would catch the error
within the closure.

Other than that, introduce the thrown error type into the type checker's
modeling of `withoutActuallyEscaping(_:do:)`, and mirror that in the
library declaration.
@DougGregor DougGregor requested review from hborla, xedin, a team and slavapestov as code owners January 14, 2024 06:06
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor enabled auto-merge January 14, 2024 06:06
@DougGregor DougGregor merged commit 467f684 into swiftlang:main Jan 14, 2024
@DougGregor DougGregor deleted the typed-throws-without-actually-escaping branch January 14, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant