fix parameters in constructors being treated as fields

This commit is contained in:
brianush1 2023-07-15 21:07:31 +03:00 committed by Jan Jurzitza
parent 2e84d9d76a
commit 60ccfd520e
1 changed files with 7 additions and 1 deletions

View File

@ -908,7 +908,6 @@ private:
CompletionKind.functionName, symbolFile, location);
symbol.parent = currentSymbol;
currentSymbol.addChild(symbol, true);
processParameters(symbol, null, THIS_SYMBOL_NAME, parameters, templateParameters);
symbol.acSymbol.protection = protection.current;
symbol.acSymbol.doc = makeDocumentation(doc);
@ -921,9 +920,16 @@ private:
pushFunctionScope(functionBody, location + 4); // 4 == "this".length
scope(exit) popScope();
currentSymbol = symbol;
processParameters(symbol, null, THIS_SYMBOL_NAME, parameters, templateParameters);
functionBody.accept(this);
currentSymbol = currentSymbol.parent;
}
else
{
currentSymbol = symbol;
processParameters(symbol, null, THIS_SYMBOL_NAME, parameters, templateParameters);
currentSymbol = currentSymbol.parent;
}
}
void visitDestructor(size_t location, const FunctionBody functionBody, string doc)