Skip to content

Use base constraint when testing whether a type needs an Awaited<T> wrapper#51230

Merged
rbuckton merged 1 commit intomainfrom
fix47291
Oct 21, 2022
Merged

Use base constraint when testing whether a type needs an Awaited<T> wrapper#51230
rbuckton merged 1 commit intomainfrom
fix47291

Conversation

@rbuckton
Copy link
Copy Markdown
Contributor

When we updated await to use Awaited<T> in 4.5, we avoided introducing a new Awaited<T> wrapper when T is a generic primitive by calling allTypesAssignableToKind. However, when T is a this type, it triggers a circularity error. This change ensures we check against the base constraint of T rather than T itself, which avoids the circularity.

Fixes #47291

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Async methods that return this are considered circular references

4 participants