Skip to content

Conversation

@AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented May 15, 2020

In preparation for storing substitution maps in bound generic types, centralize the logic for retrieving the innermost generic arguments in a new method on SubstitutionMap.

I wasn't able to find any duplication to clean up, so right now the only client is TypeAliasType::getInnermostGenericArgs. The idea is for the new method to ultimately have at least two clients, including a future BoundGenericType::getInnermostGenericArgs.


For #31895

@AnthonyLatsis AnthonyLatsis requested a review from slavapestov May 15, 2020 09:56
@AnthonyLatsis AnthonyLatsis force-pushed the substitution-revolution-pre-1 branch from 47232d3 to bf0e348 Compare May 15, 2020 10:38
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not a fan of getInnermostGenericArgs though. "Direct" generic arguments and innermost generic arguments are not always the same thing.

@AnthonyLatsis AnthonyLatsis force-pushed the substitution-revolution-pre-1 branch from bf0e348 to eedb335 Compare May 15, 2020 11:22
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@slavapestov ping

@AnthonyLatsis
Copy link
Collaborator Author

Thanks!

@AnthonyLatsis AnthonyLatsis merged commit 01e6cb3 into swiftlang:master Jun 19, 2020
@AnthonyLatsis AnthonyLatsis deleted the substitution-revolution-pre-1 branch June 20, 2020 00:58
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