Skip to content

Change send-never-sendable of isolated partial applies to use SIL level info instead of AST info. #82149

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

gottesmm
Copy link
Contributor

The reason I am doing this is that we have gotten reports about certain test cases where we are emitting errors about self being captured in isolated closures where the sourceloc is invalid. The reason why this happened is that the decl returned by getIsolationCrossing did not have a SourceLoc since self was being used implicitly.

In this commit I fix that issue by using SIL level information instead of AST level information. This guarantees that we get an appropriate SourceLoc. As an additional benefit, this fixed some extant errors where due to some sort of bug in the AST, we were saying that a value was nonisolated when it was actor isolated in some of the error msgs.

rdar://151955519

…el info instead of AST info.

The reason I am doing this is that we have gotten reports about certain test
cases where we are emitting errors about self being captured in isolated
closures where the sourceloc is invalid. The reason why this happened is that
the decl returned by getIsolationCrossing did not have a SourceLoc since self
was being used implicitly.

In this commit I fix that issue by using SIL level information instead of AST
level information. This guarantees that we get an appropriate SourceLoc. As an
additional benefit, this fixed some extant errors where due to some sort of bug
in the AST, we were saying that a value was nonisolated when it was actor
isolated in some of the error msgs.

rdar://151955519
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit e95b857 into swiftlang:main Jun 11, 2025
3 checks passed
@gottesmm gottesmm deleted the pr-4cb0aff1ceb16d75edcadd4de2ed612b97924226 branch June 11, 2025 20:52
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.

2 participants