Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[typeBaselines] Contextual signature instantiation does not work in type argument inference #547

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
JsonFreeman opened this issue Aug 26, 2014 · 1 comment · Fixed by #640
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@JsonFreeman
Copy link
Contributor

In tests/cases/compiler/inferentialTypingWithFunctionTypeNested.ts:

var s = map("", () => { return { x: identity }; });

returns any, where the old compiler returned string.

This is possibly related to #526, but this one is actually a bug in the current compiler per the spec.

@JsonFreeman JsonFreeman changed the title Contextual signature instantiation does not work in type argument inference [typeBaselines] Contextual signature instantiation does not work in type argument inference Aug 26, 2014
@jmatthiesen jmatthiesen added this to the TypeScript 1.2 milestone Aug 29, 2014
@JsonFreeman
Copy link
Contributor Author

I think we only handle the case where there is a generic function as the argument, but not if the generic function is nested in the argument.

@ahejlsberg ahejlsberg assigned ahejlsberg and unassigned JsonFreeman Sep 9, 2014
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Sep 10, 2014
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants