Reporter |
|
---|---|
Created | Oct 8, 2009 3:21:16 AM |
Updated | Aug 12, 2015 11:06:08 AM |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Normal |
State | Submitted |
Type | Feature |
Target Wave | Undefined |
Fixed In Wave | Undefined |
Affected Wave | No affected wave |
Subsystem | Context Actions |
Fix versions | No Fix versions |
Affected versions | No Affected versions |
Fixed in builds | No Fixed in build |
VsVersion | All Versions |
using System;
class A
{
public static int Foo()
{
var x = Bar(1);
x += Bar(2);
x += Bar(3);
return x;
}
private static int Bar(int i)
{
throw new NotImplementedException();
}
}
Expected result:
public static int Foo()
{
return Bar(1) + Bar(2) + Bar(3);
}
Maybe, existing 'Inline variable' refactoring can be modified to allow this kind of transformations.