VSF_TYPE_MARKDOWNWhen you type the following code:
private enum A
{
A,
B,
}
private void Get(A a) { }
private void Get(string a) { }
private void Test()
{
Get(
}
When you type the ( after the Get in the Test method, VS suggests to autocomplete the first parameter of type A, which is exactly expected.
See this picture: https://cdn.discordapp.com/attachments/369794346142269441/577795445443657728/unknown.png
But when you change the declaration order of the two Get methods, like this:
private enum A
{
A,
B,
}
private void Get(string a) { }
private void Get(A a) { }
private void Test()
{
Get(
}
And now if you type (, you get no suggestions. Notice that the first overloaded method that shows up is still the one with the A parameter, and not the string one.
See this picture: https://cdn.discordapp.com/attachments/369794346142269441/577795671596335124/unknown.png
Pressin the default Ctrl+Space does not help either.
Expected behavior: When the Get(A a) method is selected as the current overload, pressing Ctrl+Space should suggest to complete that given parameter.
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/567651/odd-intellisense-behavior-with-overloaded-methods.html
VSTS ticketId: 892502
These are the original issue comments:
Visual Studio Feedback System on 5/14/2019, 09:42 PM (21 days ago):
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Vatsalya Agrawal [MSFT] on 5/15/2019, 00:11 PM (21 days ago):
Thank you for providing feedback, and we're sorry to hear it's not behaving as you expect. Based on your description so far, we were unable to reproduce the issue. Pressing Ctrl + Space seems to be suggesting the right parameter. If possible please provide a sample project where this issue is occurring.
matej.zajacik on 5/15/2019, 00:33 PM (21 days ago): (private comment)
Thank you for the reply!
When the declaration order is Get(A a) and then Get(string a), everything works okay. Right after typing (, it does the expected thing, that is suggesting the enum A (the first picture). But when the order is Get(string a) and then Get(A a), I get no suggestion at all (the second picture). When I press Ctrl+Space, it suggests to use the ToString() method:
intellisenseissue00.png
The project: intellisenseissue.zip
These are the original issue solutions:
(no solutions)
VSF_TYPE_MARKDOWNWhen you type the following code:
When you type the
(after theGetin theTestmethod, VS suggests to autocomplete the first parameter of typeA, which is exactly expected.See this picture: https://cdn.discordapp.com/attachments/369794346142269441/577795445443657728/unknown.png
But when you change the declaration order of the two
Getmethods, like this:And now if you type
(, you get no suggestions. Notice that the first overloaded method that shows up is still the one with theAparameter, and not thestringone.See this picture: https://cdn.discordapp.com/attachments/369794346142269441/577795671596335124/unknown.png
Pressin the default
Ctrl+Spacedoes not help either.Expected behavior: When the
Get(A a)method is selected as the current overload, pressingCtrl+Spaceshould suggest to complete that given parameter.This issue has been moved from https://developercommunity.visualstudio.com/content/problem/567651/odd-intellisense-behavior-with-overloaded-methods.html
VSTS ticketId: 892502
These are the original issue comments:
Visual Studio Feedback System on 5/14/2019, 09:42 PM (21 days ago):
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Vatsalya Agrawal [MSFT] on 5/15/2019, 00:11 PM (21 days ago):
Thank you for providing feedback, and we're sorry to hear it's not behaving as you expect. Based on your description so far, we were unable to reproduce the issue. Pressing Ctrl + Space seems to be suggesting the right parameter. If possible please provide a sample project where this issue is occurring.
matej.zajacik on 5/15/2019, 00:33 PM (21 days ago): (private comment)
Thank you for the reply!
When the declaration order is
Get(A a)and thenGet(string a), everything works okay. Right after typing(, it does the expected thing, that is suggesting the enumA(the first picture). But when the order isGet(string a)and thenGet(A a), I get no suggestion at all (the second picture). When I pressCtrl+Space, it suggests to use theToString()method:intellisenseissue00.png
The project: intellisenseissue.zip
These are the original issue solutions:
(no solutions)