DFRefactor 3.1.0: Unused local variables function removes declarations of variables in use
Hello,
I have tried Unused local variables function on our biggest project and it doesn't compile after that. Reason is that we have multi-line function calls on it.
Supose something like this:
[CODE]
Function MyFunction Date dParamN1 String sParamN2 Integer iParamN3;
Integer iParamN4 Integer iParamN5 Integer iParamN6;
Integer iParamN7 Integer iParamN8 Integer iParamN9 Integer iParamN10;
Integer iParamN11 Integer iParamN12 Integer iParamN13 Integer iParamN14 Returns Date
...
Get MyOtherFunction iParamN5 iParamN6;
iParamN7 iParamN8 to dDate
...
End_Function
[/CODE]
It gets refactored to (pay attention to first variable of the third function declaration line... & third line semicolon... & Returns Keyword):
[CODE]
Function MyFunction Date dParamN1 String sParamN2 Integer iParamN3;
Integer iParamN4 Integer iParamN5 Integer iParamN6;
Integer Integer iParamN8 Integer iParamN9 Integer
Integer iParamN11 Integer iParamN12 Integer iParamN13 Integer iParamN14 Date
...
Get MyOtherFunction iParamN5 iParamN6;
iParamN7 iParamN8 to dDate
...
End_Function
[/CODE]
If I change function call to one line then it doesn't delete iParamN7 variable declaration.
P.D
Returns Keyword is commented here: [url]https://support.dataaccess.com/Forums/showthread.php?64597-DFRefactor-3-1-0-Unused-local-variables-function-broke-multi-line-function-definitions-(Return-keyword)[/url]
Line semicolon is commented here: [url]https://support.dataaccess.com/Forums/showthread.php?64598-DFRefactor-3-1-0-Unused-local-variables-function-broke-multi-line-function-definitions-(semicolon)[/url]
Regards.
Re: DFRefactor 3.1.0: Unused local variables function removes declarations of variables in use
Hi,
This was fixed in revision 283 as well.
edit: Reread your report. Please retest this one on the latest publicly available zip.
If the problem is due to the semicolumn when calling a function then we might still have a bug on this one.
--
Wil
Re: DFRefactor 3.1.0: Unused local variables function removes declarations of variables in use
Thanks Wil
I will retest all my reports tomorrow with your ZIP.
Regards.
Re: DFRefactor 3.1.0: Unused local variables function removes declarations of variables in use
Hello Wil,
You are right, I have downloaded DFRefactor 20190426 and now I don't get this behaviour.
Solved.
Thanks.