Skip to content

Fix some major SILGen bugs with pack handling: #83555

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
Aug 8, 2025

Conversation

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented Aug 6, 2025

  • Calls to variadic-generic protocol requirements weren't applying substitutions properly, so expansion-sensitive types in the callee signature weren't pairing properly with their expansions in the caller.

  • emitPackTransform had an over-destroy if the transformation function actually emitted into the temporary element directly.

  • There were some MV ownership assertions that were wrong, which revealed that the corresponding code really didn't handle consuming/ borrowing mismatches properly at all.

  • We were completely mishandled consuming packs.

Fixes #81002, fixes #80995, fixes #81600.

@rjmccall rjmccall requested a review from jckarter as a code owner August 6, 2025 00:23
@rjmccall
Copy link
Contributor Author

rjmccall commented Aug 6, 2025

@swift-ci Please test

- Calls to variadic-generic protocol requirements weren't applying
  substitutions properly, so expansion-sensitive types in the callee
  signature weren't pairing properly with their expansions in the
  caller.

- emitPackTransform had an over-destroy if the transformation function
  actually emitted into the temporary element directly.

- There were some MV ownership assertions that were wrong, which
  revealed that the corresponding code really didn't handle consuming/
  borrowing mismatches properly at all.

- We were completely mishandled consuming packs.

Fixes swiftlang#81002, swiftlang#80995, and swiftlang#81600.
@rjmccall rjmccall force-pushed the variadic-witness-fixes branch from c3d7684 to 8ad4aae Compare August 6, 2025 16:39
@rjmccall
Copy link
Contributor Author

rjmccall commented Aug 6, 2025

@swift-ci Please smoke test

@rjmccall
Copy link
Contributor Author

rjmccall commented Aug 6, 2025

@swift-ci Please clean smoke test macOS

@rjmccall
Copy link
Contributor Author

rjmccall commented Aug 6, 2025

@swift-ci Please test Windows

@rjmccall
Copy link
Contributor Author

rjmccall commented Aug 7, 2025

@swift-ci Please test macOS

1 similar comment
@tshortli
Copy link
Contributor

tshortli commented Aug 7, 2025

@swift-ci Please test macOS

@rjmccall rjmccall merged commit fee0e5c into swiftlang:main Aug 8, 2025
4 checks passed
@rjmccall rjmccall deleted the variadic-witness-fixes branch August 8, 2025 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants