Skip to content

[ConstraintSystem] Adjust the way pack parameters are opened #66910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 24, 2023

Although variadic type is declared without repeat each of its generic arguments is
supposed to be a PackType which is modeled in the interface type as Pack{repeat ...}.
When reference to such a type is opened by the constraint solver we need to drop the
Pack{repeat ...} structure because the type variable would represent a pack type so
S<each T> is opened as S<$T0> instead of S<Pack{repeat $T0}>.

Resolves: #66095

@xedin xedin requested a review from hborla as a code owner June 24, 2023 00:42
Although variadic type is declared without `repeat` each of
its generic arguments is supposed to be a PackType which is
modeled in the interface type as `Pack{repeat ...}`. When
reference to such a type is opened by the constraint solver
we need to drop the Pack{repeat ...} structure because the
type variable would represent a pack type so `S<each T>`
is opened as `S<$T0>` instead of `S<Pack{repeat $T0}>`.

Resolves: swiftlang#66095
@xedin
Copy link
Contributor Author

xedin commented Jun 24, 2023

@swift-ci please test

@stackotter
Copy link

Thanks for the fix 🙏

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.

Compiler crash when forwarding variadic type parameter pack to initializer
3 participants