Skip to content

Conversation

@slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jul 3, 2025

6.2 cherry-pick of #82757

  • Description: Fix a crash with implicit member references .foo where the contextual type was a protocol composition or parameterized protocol due to unhandled case.
  • Origination: This never worked.
  • Risk: Very low. Ending up in the code path with either of the other two types that answer true to isConstraintType() would have crashed, as demonstrated by the test case. I believe this fix is completely safe.
  • Issue: Fixes swiftc crash: subtype conversion in MetatypeConversionExpr is invalid: P<Int> to T #60552.
  • Radar: Fixes rdar://problem/99699879.
  • Reviewed by: @xedin and @AnthonyLatsis

…ocol contextual type

- Fixes swiftlang#60552.
- Fixes rdar://problem/99699879.
@slavapestov slavapestov requested a review from a team as a code owner July 3, 2025 04:24
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov changed the title Sema: Fix leading dot with protocol composition or parameterized protocol contextual type [6.2] Sema: Fix leading dot with protocol composition or parameterized protocol contextual type Jul 3, 2025
@slavapestov slavapestov enabled auto-merge July 3, 2025 17:38
@slavapestov slavapestov merged commit 0022c31 into swiftlang:release/6.2 Jul 3, 2025
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.

2 participants