mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 15:59:13 +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}
|
{$ENDIF}
|
||||||
Classes, SysUtils, Laz_AVL_Tree,
|
Classes, SysUtils, Laz_AVL_Tree,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazFileUtils, LazUtilities,
|
LazFileUtils, LazStringUtils, LazUtilities,
|
||||||
// Codetools
|
// Codetools
|
||||||
CodeToolsStrConsts, CodeTree, CodeAtom, CustomCodeTool,
|
CodeToolsStrConsts, CodeTree, CodeAtom, CustomCodeTool,
|
||||||
SourceLog, KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache,
|
SourceLog, KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache,
|
||||||
@ -14185,9 +14185,9 @@ end;
|
|||||||
|
|
||||||
procedure TFindDeclarationParams.AddOperandPart(aPart: string);
|
procedure TFindDeclarationParams.AddOperandPart(aPart: string);
|
||||||
begin
|
begin
|
||||||
if aPart=FExtractedOperand then // Hunting for issue #37384
|
// Prevent identifier being added many times. See issue #37384.
|
||||||
raise Exception.Create('TFindDeclarationParams.AddOperandPart: Adding duplicate "'+aPart+'"');
|
if not LazEndsStr(aPart, FExtractedOperand) then
|
||||||
FExtractedOperand := FExtractedOperand + aPart;
|
FExtractedOperand:=FExtractedOperand+aPart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFindDeclarationParams.ChangeFoundProc(
|
procedure TFindDeclarationParams.ChangeFoundProc(
|
||||||
|
Loading…
Reference in New Issue
Block a user