Skip to content

Commit 14e24e8

Browse files
committed
removed the bracketed parameter code and test
1 parent c82459e commit 14e24e8

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

RetailCoder.VBE/Inspections/QuickFixes/PassParameterByReferenceQuickFix.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ private VBAParser.ArgContext GetArgContextForIdentifier(RuleContext context, str
3737
{
3838
var argList = GetArgListForContext(context);
3939
return argList.arg().SingleOrDefault(parameter =>
40-
Identifier.GetName(parameter).Equals(identifier)
41-
|| Identifier.GetName(parameter).Equals("[" + identifier + "]"));
40+
Identifier.GetName(parameter).Equals(identifier));
4241
}
4342
private string GenerateByRefReplacementLine(ITerminalNode terminalNode)
4443
{

RubberduckTests/Inspections/AssignedByValParameterInspectionTests.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,6 @@ End Sub
240240
quickFixResult = ApplyPassParameterByReferenceQuickFixToVBAFragment(inputCode);
241241
Assert.AreEqual(expectedCode, quickFixResult);
242242

243-
inputCode =
244-
@"Private Sub Foo(ByVal barByVal As Long, ByVal barTwoon As Long, ByVal [barTwo] As Long)
245-
barTwo = 42
246-
End Sub
247-
";
248-
expectedCode =
249-
@"Private Sub Foo(ByVal barByVal As Long, ByVal barTwoon As Long, ByRef [barTwo] As Long)
250-
barTwo = 42
251-
End Sub
252-
";
253-
254-
quickFixResult = ApplyPassParameterByReferenceQuickFixToVBAFragment(inputCode);
255-
Assert.AreEqual(expectedCode, quickFixResult);
256243
}
257244

258245

0 commit comments

Comments
 (0)