-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Diagnostics and quick info disagree on type of variable #19686
Comments
ghost
mentioned this issue
Nov 4, 2017
Both now say |
When I run the fourslash test in the master branch, I still see a compile-time error |
ghost
mentioned this issue
Sep 4, 2018
ghost
mentioned this issue
Oct 2, 2018
ghost
removed their assignment
Nov 16, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TypeScript Version: 2.7.0-dev.20171102
Code
Hover over
s
.Expected behavior:
This test should pass:
Actual behavior:
The type in quick info is
string
, but we also get a diagnostic about it being{}
instead.In the real situation
f()
could be arbitrarily far away from the call toeach
, such as in a function with no explicit return type, so it's very hard to diagnose such an error when quick info tells you everything is fine!The text was updated successfully, but these errors were encountered: