Skip to content

Emit Debug Variables for Errors Bound in Catch Clauses #40372

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
merged 1 commit into from
Dec 3, 2021

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Dec 2, 2021

Make error variables accessible to a fresh debug scope for the catch clause.

rdar://85982381

@CodaFi
Copy link
Contributor Author

CodaFi commented Dec 2, 2021

@swift-ci test

Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is great, thanks!

@adrian-prantl
Copy link
Contributor

@kastiglione does this take care of all known remaining issues with error variables?

@kastiglione
Copy link
Contributor

Much appreciated! It looks to cover all the cases.

@kastiglione
Copy link
Contributor

After this is committed, I can add some lldb level tests.

do {
try throwing()
}
catch let error as MyError, let error as MyError {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why multiple/duplicate bindings isn't an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodaFi
Copy link
Contributor Author

CodaFi commented Dec 2, 2021

@swift-ci test windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Dec 2, 2021

Build failed
Swift Test Linux Platform
Git Sha - 1bbf2aa17b4b7cf7c1319ee7b6628c2dcdb73cfa

@CodaFi
Copy link
Contributor Author

CodaFi commented Dec 2, 2021

@swift-ci smoke test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Dec 2, 2021

Build failed
Swift Test OS X Platform
Git Sha - 1bbf2aa17b4b7cf7c1319ee7b6628c2dcdb73cfa

Make error variables accessible to a fresh debug scope for the catch clause.

rdar://85982381
@CodaFi
Copy link
Contributor Author

CodaFi commented Dec 3, 2021

@swift-ci smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented Dec 3, 2021

Neat

@CodaFi CodaFi merged commit eb9ddec into swiftlang:main Dec 3, 2021
@CodaFi CodaFi deleted the down-periscope branch December 3, 2021 06:42
@compnerd
Copy link
Member

compnerd commented Dec 3, 2021

This was merged with a regression on the Windows bot that is indicated in the CI results on the PR: https://ci-external.swift.org/job/swift-PR-windows/18932/consoleText

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.

5 participants