Skip to content

Conversation

@slavapestov
Copy link
Contributor

  • Description: We need to serialize the underlying type substitution map for an inlinable function. However, there is no reason to deserialize it eagerly, since doing so can lead to cycles. It is better for correctness and performance to only deserialize it when needed.

  • Scope of the issue: Request cycles when multiple overloads of the same symbol have opaque result types, one is inlinable, and it depends on the other.

  • Origination: Technically this fixes a regression from AST: Allow non-canonical opaque archetypes #84299, but the actual problem was there all along, it was just exposed by my change on a specific project.

  • Radar: Fixes rdar://163301203.

  • Reviewed by: TBD

  • Risk: Medium, perhaps, because this is a bigger change, but it's early in the release cycle.

…utions

We need to serialize the underlying type substitution map for an
inlinable function. However, there is no reason to deserialize it
eagerly, since doing so can lead to cycles. It is better for
correctness and performance to only deserialize it when needed.

Technically this fixes a regression from swiftlang#84299, but the actual
problem was there all along, it was just exposed by my change
on a specific project.

Fixes rdar://163301203.
@slavapestov slavapestov requested a review from a team as a code owner November 24, 2025 18:43
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

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.

1 participant