-
Notifications
You must be signed in to change notification settings - Fork 4k
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
IntelliSense loses the type of Action<T> parameter only while typing #72571
Comments
The root cause is likely a compiler issue (ability to recover in the presence of an error in a lambda). I'm not sure whether that root cause can be addressed or whether it will need to be worked around from the IDE side.
|
This def feels like an odd case for the compiler to not be able to get good semantics with (esp. as there are no overloads goign on). Given:
I would expect Given the simplicity of the scenario, i would really want compiler to give reasonable results here :) Thanks! |
Version Used:
Steps to Reproduce:
a
, like typinga.Foo1 = "something"
. IntelliSense cannot shows any member ofa
and the type ofa
is?
a
, it correctly detectsa
asA
. The momenta
is access/typed however, it becomes?
again.a
and the problem happens again.The behavior is similar to #68027 so I wonder if it's the same issue. This only affects IntelliSense, the code can be compiled successfully if it's typed manully.
I have also just realized it only happen to the automatic
new()
statement. Explicitly typenew Config()
on the first line would fix this issue.Diagnostic Id: None
Expected Behavior:
a
's type should be kept consistent while typing.Actual Behavior:
a
loses its type while typing.The text was updated successfully, but these errors were encountered: