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

[6.0] SIL: Consistently drop substitution map when forming apply instructions #74275

Merged

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jun 11, 2024

6.0 cherry-pick of #74266

  • Description: Fixes a spurious diagnostic with @_noLocks. We diagnose partial applies that have non-empty substitution maps in a special SIL pass. As a result of the pack element capture changes, SILGen would sometimes generate a partial apply of a non-generic closure with a non-empty substitution map. This change asserts that the substitution map is non-empty if and only if the callee's generic signature is non-empty, and fixes the fallout from adding this assert.

  • Origination: The specific test case here regressed recently but the invariant in question was never enforced so it was always broken.

  • Risk: The new assertion might uncover more bugs in assert builds, but otherwise very low.

  • Radar: rdar://129298104

  • Reviewed by: @eeckstein

@slavapestov slavapestov requested a review from a team as a code owner June 11, 2024 00:12
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit a26ebe4 into swiftlang:release/6.0 Jun 11, 2024
5 checks passed
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.

None yet

2 participants