roslyn
roslyn copied to clipboard
IntelliSense not suggesting correct variable
Direct customer quote copying here:
I’m trying to write a simple If statement, and I’m trying to use a local variable called howMany. No matter how much I type, intellisense will not suggest the variable howMany. I press [Cntrl] + [spacebar] for suggestions and you can see it says there are no suggestions. Once I finish typing out the entire variable name VS is happy, and the red squiggly goes way, indicating it knows the variable is good.
Here is the repo with the sample code - https://dev.azure.com/ChalkLogic/_git/VisualStudio-Intellisense-Woe
I can reproduce this. The weird thing is that it doesn't reproduce with ==
or >
. Only reproducible with <
.
My guess is that it relates to our code to detect and handle generic expressions as they're being typed.
I found that after removing using System.Linq;
the variable shows. I guess the Count<T>
extension method caused intellisense to only show suggestions for T
.
Fixed by #70122 Please confirm @CyrusNajmabadi
Sounds good