Skip to content

Defer resolution of conditional types with generic check or extends types #28851

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 4 commits into from
Dec 4, 2018

Conversation

ahejlsberg
Copy link
Member

With this PR we always defer resolution of conditional types when one or both of the check and extends types are generic (as determined by TypeFlags.Instantiable). Now, only when neither is generic do we perform further assignability checks to see if we can resolve a conditional type.

Fixes #28824.

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

With this change, distributivity is down to only affecting conditional type instantiation and constraints (which mostly follow from instantiation). I like more things not making the distinction between the distributive/nondistributive variants.

@ahejlsberg ahejlsberg merged commit b34c73f into master Dec 4, 2018
@ahejlsberg ahejlsberg deleted the deferConditionalTypes branch December 4, 2018 23:49
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.

Nested Exclude has unexpected behavior
2 participants