Skip to content

Commit b8339ba

Browse files
committed
Fix bug - assign to value passed in, not to parameter name
1 parent dd7c4d1 commit b8339ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RetailCoder.VBE/Inspections/ProcedureShouldBeFunctionInspectionResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ d.Context is VBAParser.SubStmtContext &&
104104
if (referenceParent == null) { continue; }
105105

106106
var referenceText = reference.Context.Parent.GetText();
107-
var newCall = _argQualifiedContext.Context.ambiguousIdentifier().GetText() +
107+
var newCall = referenceParent.argsCall().argCall().ToList().ElementAt(_argListQualifiedContext.Context.arg().ToList().IndexOf(_argQualifiedContext.Context)).GetText() +
108108
" = " + _subStmtQualifiedContext.Context.ambiguousIdentifier().GetText() +
109109
"(" + referenceParent.argsCall().GetText() + ")";
110110

0 commit comments

Comments
 (0)