mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:48:03 +02:00
Codetools: Prevent identifier being added many times. A hack but works. Issue #37384.
This commit is contained in:
parent
021deb1dee
commit
c3a2bf802b
@ -80,7 +80,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, Laz_AVL_Tree,
|
||||
// LazUtils
|
||||
LazFileUtils, LazUtilities,
|
||||
LazFileUtils, LazStringUtils, LazUtilities,
|
||||
// Codetools
|
||||
CodeToolsStrConsts, CodeTree, CodeAtom, CustomCodeTool,
|
||||
SourceLog, KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache,
|
||||
@ -14185,9 +14185,9 @@ end;
|
||||
|
||||
procedure TFindDeclarationParams.AddOperandPart(aPart: string);
|
||||
begin
|
||||
if aPart=FExtractedOperand then // Hunting for issue #37384
|
||||
raise Exception.Create('TFindDeclarationParams.AddOperandPart: Adding duplicate "'+aPart+'"');
|
||||
FExtractedOperand := FExtractedOperand + aPart;
|
||||
// Prevent identifier being added many times. See issue #37384.
|
||||
if not LazEndsStr(aPart, FExtractedOperand) then
|
||||
FExtractedOperand:=FExtractedOperand+aPart;
|
||||
end;
|
||||
|
||||
procedure TFindDeclarationParams.ChangeFoundProc(
|
||||
|
Loading…
Reference in New Issue
Block a user