Skip to content

Conversation

hamishknight
Copy link
Contributor

Second attempt at 97be042.

We shouldn't be allocating placeholders for type variables in the permanent arena, and we should be caching them such that equality works.

To achieve this, we need to introduce a new "solver allocated" type property. This is required because we don't want to mark placeholder types with type variable originators as themselves having type variables, as it's not part of their structural type. Also update ErrorType to use this bit, though I don't believe we currently create ErrorTypes with type variable originators.

We shouldn't be allocating placeholders for type
variables in the permanent arena, and we should be
caching them such that equality works.

To achieve this, we need to introduce a new
"solver allocated" type property. This is required
because we don't want to mark placeholder types
with type variable originators as themselves having
type variables, as it's not part of their structural
type. Also update ErrorType to use this bit, though
I don't believe we currently create ErrorTypes
with type variable originators.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight hamishknight merged commit d54ee5d into swiftlang:main May 8, 2023
@hamishknight hamishknight deleted the second-place branch May 8, 2023 16:50
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