Skip to content

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

Merged
Anders Hejlsberg (ahejlsberg) merged 4 commits into
masterfrom
deferConditionalTypes
Dec 4, 2018
Merged

Defer resolution of conditional types with generic check or extends types#28851
Anders Hejlsberg (ahejlsberg) merged 4 commits into
masterfrom
deferConditionalTypes

Conversation

@ahejlsberg

Copy link
Copy Markdown
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.

@weswigham Wesley Wigham (weswigham) left a comment

Copy link
Copy Markdown
Member

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested Exclude has unexpected behavior

2 participants