Skip to content

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Aug 27, 2025

  • Explanation: Currently, the ASTMangler has 2 ways of emitting an extended existential mangling: 1. if the extended existential is parameterized, it will eagerly try to symbolically reference the extended shape or 2. just as a flat string. For extended existentials that have inverses, it was taking the 2nd option. The runtime does not currently have the capabilities to decode an extended existential without a shape referenced in the type mangling, so when attempting to create metadata for something like any ~Copyable it would fail spectacularly.
  • Risk: Medium. Changes how the compiler mangles extended existentials with inverse requirements. It doesn't add or remove mangling rules, just uses a different form of mangling it already knows how to demangle at runtime.
  • Testing: Tested by an interpreter test.
  • Issue: rdar://150219645
  • Reviewer: @slavapestov
  • Main branch PR: [AST & Runtime] Correctly mangle extended existentials with inverse requirements #81365

[AST & Runtime] Correctly mangle extended existentials with inverse requirements
@Azoy Azoy requested a review from a team as a code owner August 27, 2025 17:06
@Azoy
Copy link
Contributor Author

Azoy commented Aug 27, 2025

@swift-ci please test

@Azoy
Copy link
Contributor Author

Azoy commented Aug 28, 2025

@swift-ci please test Windows

@Azoy Azoy merged commit f15d600 into swiftlang:release/6.2 Aug 30, 2025
5 checks passed
@Azoy Azoy deleted the 62-extended-existentials branch August 30, 2025 18:10
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