-
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
Incorrect Overrides completion in VB #39592
Comments
@jinujoseph FYI |
Made some debugging and found that the NFW likely causes the completion to fail but the NFW occurs out of the completion path. It happens in the Import Adder (see #37228). I do not know details of triggering this feature. There is a simpler scenario to get trigger the NFW: go to Go to VisualBasicCompilation class in src\Compilers\VisualBasic\Portable\Compilation\VisualBasicCompilation.vb and hit enter within the class to add a new line. If you are in the debug mode, you can catch the same fault. Nevertheless, the Import Adder calls VisualBasicSyntaxRewriter which analyzes the VisualBasicCompilation.vb file. When it comes to roslyn/src/Compilers/VisualBasic/Portable/Compilation/VisualBasicCompilation.vb Line 2774 in 47215bd
It considers
Questions:
|
It looks like |
Thank you, @AlekseyTs ! So, it means that the rewriter is responsible for the type of the node. In the case, it is |
So the issue seems to be that the ImportAdder wants to expand everything and at the point that it is trying to expand the Lines 773 to 783 in 5cae62a
|
I'll try and take a look if I get the chance. My gut feeling is the solution is to check that the simplifier returns the correct type, and if not don't expand and add a warning that we couldn't expand it. We already do that for extension methods. |
I have no idea what the purpose of the else block is, and this dates back to before Roslyn was on GitHub, so I can't find out that way. |
I think the solution is actually to add
SyntaxFacts.cs already does this for CRefParameter |
Fix at #39629 |
Version Used:
Microsoft Visual Studio Enterprise 2019 Int Preview
Version 16.5.0 Preview 1.0 [29427.7.master]
Steps to Reproduce:
Overrides
, press space and select Test from the list of methods available to override.Expected Behavior:
Actual Behavior:
The following entry in the log is likely related:
The text was updated successfully, but these errors were encountered: