Skip to content

[GenericSignature] Exclude GenericParam Constraints #66864

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

Conversation

angela-laar
Copy link
Contributor

@angela-laar angela-laar commented Jun 22, 2023

Only preserve primary associated types during type erasure if the generic context does not contain outer generic prameters.

i.e.

Given func foo { ... any P <Int> ... } getNonDependentUpperBounds()
should produce any P<Int>

However, given func foo<T> { ... any P<T> ... } getNonDependentUpperBounds()
should produce any P

Fixes rdar://110262754

@angela-laar
Copy link
Contributor Author

@swift-ci please smoke test

Only preserve primary associated types during type erasure if the
generic context does not contain outer generic prameters.

i.e.

  Given `func foo {  ... any P <Int> ... }` getNonDependentUpperBounds()
  should produce any P<Int>

  However, given `func foo<T> { ... any P<T> ... }` getNonDependentUpperBounds()
  should produce any P

Fixes rdar://110262754
@angela-laar angela-laar force-pushed the exclude-generic-param-constraints branch from c4dbbfe to a92deb0 Compare June 22, 2023 21:20
@angela-laar
Copy link
Contributor Author

@swift-ci please smoke test

@angela-laar
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@angela-laar angela-laar merged commit 6607f05 into swiftlang:main Jun 23, 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.

3 participants