IntelliSense Fails After return Keyword
Hi Joe,
I'm using LINQPad v9.7.13 beta (X64), and I've encountered an issue where IntelliSense stops providing identifier suggestions (such as class or variable names) after the return keyword.
As shown in the screenshot above, class name suggestions do not appear. In fact, the same issue occurs in local variable names.
For comparison, IntelliSense works correctly in assignment statements.
Interestingly, within a return statement, IntelliSense still functions properly after a dot operator.
Comments
-
Phenomena mentioned above occurs in both script and .cs file modes.
-
I tend to see this occur a lot when you have a local function defined at the tail, and you're writing code just before it. The parser probably doesn't know what the state of the code since it's technically complete.

I'm not sure how robust the compiler usually is for this scenario, seems like a hard problem.
I suspect you're running into a similar thing where it's using the "statements" parser but is encountering full classes (which may not be as robust) and isn't able to analyze correctly. However, with all that said, it is still providing suggestions to me with the return statement, albeit, heavily cut down.
