Skip to content

Commit e58bb04

Browse files
committed
Fix RemoveParameterRefactoring
This commit fixes several bugs in the refactoring via a basically complete rewrite. Now, it uses the argument references to the parameters to find all call sites. There is still an outstanding issue to deal with with dictionary access expressions.
1 parent 93cf16b commit e58bb04

File tree

3 files changed

+543
-192
lines changed

3 files changed

+543
-192
lines changed

Rubberduck.Refactorings/RemoveParameters/Parameter.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Rubberduck.Parsing.Symbols;
2-
using Rubberduck.Parsing.VBA;
32
using Rubberduck.Parsing.VBA.Extensions;
43

54
namespace Rubberduck.Refactorings.RemoveParameters
@@ -13,9 +12,9 @@ public class Parameter
1312
public string Name { get; }
1413
public bool IsParamArray => Declaration.IsParamArray;
1514

16-
public Parameter(Declaration declaration, bool isRemoved = false)
15+
public Parameter(ParameterDeclaration declaration, bool isRemoved = false)
1716
{
18-
Declaration = (ParameterDeclaration)declaration;
17+
Declaration = declaration;
1918
Name = declaration.Context.GetText().RemoveExtraSpacesLeavingIndentation();
2019
}
2120
}

0 commit comments

Comments
 (0)