Skip to content

Conversation

@hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Oct 16, 2025

6.2 cherry-pick of #84957

  • Explanation: Fixes a crash that could occur when referencing an unbound generic type with a conditional Copyable conformance in a function parameter
  • Scope: Affects type resolution diagnostic logic for non-copyable types
  • Issue: rdar://152287178
  • Risk: Low, the fix is narrow and matches the existing logic we have for unbound generics that haven't been opened
  • Testing: Added tests to test suite
  • Reviewer: Slava Pestov

Add a guard to make sure we don't attempt to check for Copyable
conformance if the type contains type variables. This matches the
existing behavior where we won't check for unbound generic types.
Neither behavior is correct since we won't do the proper check once
the generic type is opened, but this at least makes the behavior
consistent and fixes the crash. It's also a very low risk fix that
can be cherry-picked.

rdar://152287178
@hamishknight hamishknight requested a review from bnbarham October 16, 2025 19:42
@hamishknight hamishknight requested a review from a team as a code owner October 16, 2025 19:42
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Oct 16, 2025
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit d7bb1fe into swiftlang:release/6.2 Oct 17, 2025
5 checks passed
@hamishknight hamishknight deleted the quick-fix-6.2 branch October 17, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍒 release cherry pick Flag: Release branch cherry picks swift 6.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants