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

Ensure all default type params are mapped to some default even in circular scenarios #28423

Merged
merged 2 commits into from
Nov 12, 2018

Conversation

weswigham
Copy link
Member

Fixes #28388

In #28222 we started having type parameters have a "base default" of their constraint while we solve for their defaults - however when a type parameter is circularly constrained (we allow this) and circularly defaulted (that we allow this is what caused the last change), this caused uninstantiated parameters to leak into the default. Now we ensure that any references in the constraint to type parameters being default'ed are mapped to the base default type for the context ({} or any depending on JS-or-not).

@weswigham weswigham added this to the TypeScript 3.2 milestone Nov 9, 2018
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.

Just for testing, could you a .js test file to the current test case?

src/compiler/checker.ts Show resolved Hide resolved
@weswigham
Copy link
Member Author

@DanielRosenwasser this OK?

@weswigham weswigham merged commit eb21eb8 into microsoft:master Nov 12, 2018
@weswigham weswigham deleted the mithril-component-this-type branch November 12, 2018 21:52
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.

2 participants