Skip to content

Conversation

@ahejlsberg
Copy link
Member

Fixes #43502.

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.

This looks OK, but what about something like T & {__tag: void} & string? Should the T's constraints still be contributing facts? As written they always do, which is... Maybe bad? If T is constrained to tags, I think the original issue recurs.

@ahejlsberg
Copy link
Member Author

but what about something like T & {__tag: void} & string? Should the T's constraints still be contributing facts?

Yeah, good point. I'll make sure that's handled too.

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.

A test with union/intersection constraints would be nice, but I think this looks good.

@ahejlsberg ahejlsberg merged commit d41943e into master Apr 7, 2021
@ahejlsberg ahejlsberg deleted the fix43502 branch April 7, 2021 21:29
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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.

Regression: Tagged types are incorrectly refined

5 participants