Skip to content

fix #10698: infer primitive return type in generic position #11313

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

Closed

Conversation

HerringtonDarkholme
Copy link
Contributor

Fix #10698 This fix only applies to primitive return type, so it guarantees no implicit any will escape the warning. It's just a mitigation for cyclic type inference, but I think it is good enough for common usage.

Some cyclic cases like let f = () => f are not fixed, because it will need to generate more anonymous type for later merging. I don't know whether this is good.

@yuit @mhegazy How do you feel about this approach?

@HerringtonDarkholme
Copy link
Contributor Author

ping @yuit

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

Function return type is not inferred when used in generic position
2 participants