History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-25578
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Assignee: Oleg Stepanov
Reporter: Maxim A. Babenko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

'Create local variable' adds unneccessary brace

Created: 06 Aug 06 17:47   Updated: 09 Sep 06 13:33
Component/s: Code Completion
Fix Version/s: 1.0, 2.0.1
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Duplicate
 
This issue is duplicated by:
RSRP-25416 Extra bracket and semi-column when ge... Closed

Build: 248
Fixed in build: 250
Old URL: http://www.intellij.net/tracker/resharper/viewSCR?publicId=25578


 Description  « Hide
Before:
Dictionary<int, int> d = new Dictionary<int, int>();
int key = 1;
if (d.TryGetValue(key, ))

After:

Dictionary<int, int> d = new Dictionary<int, int>();
int key = 1;
int value;
if (d.TryGetValue(key, value)))


 All   Comments   Work Log   Change History      Sort Order:
Maxim A. Babenko - 09 Aug 06 15:05
Re: #25578- 'Create local variable' adds unneccessary brace
Since the original snippet does not seem to work everywhere, here's another one:
class test
	{
		void foo()
		{
			object[] maps = null;

			bar(new object[]
				{
				});

			foreach (object map in |)
				maps = maps;
		}

		void bar(object[] o)
		{
		}
	}

Press Ctrl-Shift-Space and select 'maps'. Press Tab.