Skip to content

Conversation

@hamishknight
Copy link
Contributor

6.2 cherry-pick of #82721, minus the last commit

  • Explanation: Fixes a crash that could occur when referencing or completing on a value generic parameter with an invalid value type
  • Scope: Affects invalid value generic parameters
  • Issue: rdar://154856417
  • Risk: Low, only affects invalid code, switches a null Type with an ErrorType in invalid cases
  • Testing: Added tests to test suite
  • Reviewer: Pavel Yaskevich

If we fail to resolve the value type for a value generic parameter,
previously we would have returned a null Type, causing crashes
downstream. Instead, return an ErrorType, leaving a null Type for
cases where the generic parameter isn't a value generic at all.

rdar://154856417
@hamishknight hamishknight requested a review from bnbarham July 2, 2025 20:27
@hamishknight hamishknight requested a review from a team as a code owner July 2, 2025 20:27
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Jul 2, 2025
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit ef8e576 into swiftlang:release/6.2 Jul 3, 2025
5 checks passed
@hamishknight hamishknight deleted the err-val-6.2 branch July 4, 2025 10:04
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.

2 participants