Skip to content

Two local functions with same parmater offer unique names in Intellisense #35891

@vsfeedback

Description

@vsfeedback

VSF_TYPE_MARKDOWNDeclaring two local functions with classes (structs, others?) as parameters results in intellisense suggesting that the parameters in the second function have a different name, even though there is no reason it cannot use the same name.

class Test
{
	void function()
	{
		void LocalFunction1(Test test) //intellisense will suggest test
		{ }

void LocalFunction2(Test test1) //intellisense will suggest test1 instead of test
		{ }
	}
}

The same behaviour can be observed for classes with more complex names

class TestClass
{
	void function()
	{

void LocalFunction1(TestClass testClass) //intellisense will suggest testClass
		{ }

void LocalFunction2(TestClass test) //intellisense will suggest test instead of testClass
		{ }
	}
}

May be related #31304

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/569267/two-local-functions-with-same-parmater-offer-uniqu.html
VSTS ticketId: 893063

These are the original issue comments:

Visual Studio Feedback System on 5/15/2019, 07:16 PM (6 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.

Visual Studio Feedback System on 5/17/2019, 05:50 PM (4 days ago):

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017#faq . In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/ . We'll keep you posted on any updates to this feedback.

These are the original issue solutions:
(no solutions)

Metadata

Metadata

Assignees

Labels

Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.com

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions