Skip to content
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

Fix intersection inference #18363

Merged
merged 3 commits into from
Sep 11, 2017
Merged

Fix intersection inference #18363

merged 3 commits into from
Sep 11, 2017

Conversation

ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Sep 9, 2017

Fixes #18354.

Verified that there are no changes to RWC baselines.

@RyanCavanaugh Would you mind giving the fourslash changes (related to JSX inference) a look? Best I can tell they are correct.

Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

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

Looks good other than the test nit.

declare const a: { prop: string } & { prop: number };
declare const b: { prop: string & number };

f(a); // string & number
Copy link
Member

@DanielRosenwasser DanielRosenwasser Sep 9, 2017

Choose a reason for hiding this comment

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

Consider using more realistic types for this test given that we've already been thinking about removing empty intersections types.

@jwbay
Copy link
Contributor

jwbay commented Sep 10, 2017

Does this change affect or undo #14829 (comment) ?

@ahejlsberg
Copy link
Member Author

@jwbay This PR has no effect on #14829.

@ahejlsberg ahejlsberg merged commit d65a3e1 into master Sep 11, 2017
@ahejlsberg ahejlsberg deleted the fixIntersectionInference branch September 11, 2017 19:46
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
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.

5 participants