Skip to content

Sema: Fix two problems in checkReferencedGenericParams() analysis #67566

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
Jul 28, 2023

Conversation

slavapestov
Copy link
Contributor

  • Don't walk into the count type of a PackExpansionType, because when matching two PackExpansionTypes, the solver only introduces a shape constraint between the count types, which does not fix it to a concrete type.

  • Similarly, don't walk into type alias substitutions, because only the desugared type is considered by the constraint solver.

This is mildly source breaking, in that before we let you declare generic functions that could not be called.

- Don't walk into the count type of a PackExpansionType, because
  when matching two PackExpansionTypes, the solver only introduces
  a shape constraint between the count types, which does not fix it
  to a concrete type.

- Similarly, don't walk into type alias substitutions, because
  only the desugared type is considered by the constraint solver.

This is mildly source breaking, in that before we let you declare
generic functions that could not be called.
@slavapestov slavapestov requested review from hborla and xedin as code owners July 27, 2023 16:16
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Windows

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@slavapestov slavapestov merged commit 518d729 into swiftlang:main Jul 28, 2023
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