Skip to content

[CodeCompletion] Use substGenericArgs in getTypeOfMember #38447

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

hamishknight
Copy link
Contributor

For a GenericFunctionType, use substGenericArgs instead of subst, as the latter would form a bad generic signature if there were UnresolvedTypes present in the base type, causing the GSB to blow up when attempting to canonicalize it.

rdar://80635105

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.

How close are we to banning subst() from being called on GenericFunctionType altogether?

@hamishknight
Copy link
Contributor Author

@slavapestov From a quick run of the test suite with an assertion in place, I think we're getting fairly close, synthesizeDesignatedInitOverride seems to be one of the main remaining offenders

@slavapestov
Copy link
Contributor

@hamishknight That's great!

For a GenericFunctionType, use `substGenericArgs`
instead of `subst`, as the latter would form a bad
generic signature if there were UnresolvedTypes
present in the base type, causing the GSB to blow
up when attempting to canonicalize it.

rdar://80635105
@hamishknight hamishknight force-pushed the fewer-substitutions-for-you branch from 221c5ff to f90befe Compare July 19, 2021 10:26
@swiftlang swiftlang deleted a comment from swift-ci Jul 19, 2021
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@swiftlang swiftlang deleted a comment from swift-ci Jul 19, 2021
@hamishknight hamishknight merged commit 63c6f98 into swiftlang:main Jul 19, 2021
@hamishknight hamishknight deleted the fewer-substitutions-for-you branch July 19, 2021 17:14
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