Open jbabijczuk opened 8 years ago
Better solution:
private FunctionInterface getCachedFunction(CodeAnalysisResults results)
{
FunctionInterface activeFunction = results.getCachedFunction(functionName);
if (activeFunction == null)
return null;
if (activeFunction.getUnit() != results.getActiveUnit())
return null;
if ((results.getParseStatus() == LexerMetrics.IMPLEMENTATION) && (!activeFunction.isDeclaration()))
return null;
return activeFunction;
}
private FunctionInterface createFunction(CodeAnalysisResults results, ClassInterface currentClass)
{
FunctionInterface activeFunction = getCachedFunction(results);
if (activeFunction == null)
@jbabijczuk thanks for the fix, I think it worked, but I found another annoying bug!
There is a problem with nested functions.
Scenario
Example in attached file.
I added this code
in method
FunctionInterface createFunction(CodeAnalysisResults results, ClassInterface currentClass)
It solved this problem but it is not a good solution :(
. Desktop.zip