diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index b6899deb24..cf57457d7e 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -7032,6 +7032,8 @@ begin end else if Node.Desc<>ctnTypeDefinition then exit; Node:=Node.FirstChild; + if Node=nil then + Exit; Identifier:=@Src[Node.StartPos]; if (Node=nil) or (not (Node.Desc in AllClasses)) diff --git a/components/codetools/linkscanner.pas b/components/codetools/linkscanner.pas index d8123ddf62..9ab8514b9f 100644 --- a/components/codetools/linkscanner.pas +++ b/components/codetools/linkscanner.pas @@ -1045,7 +1045,7 @@ function TDirectiveSequenceItem.FindValue(const ACleanPos: integer; out I, Max, Min: Integer; ResIndex, ResCleanPos: integer; begin - Max := High(FItems); + Max := FLastItem; Min := 0; ResIndex := -1; ResCleanPos := -1; diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 0cdd723661..f99ae6a8ab 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -4101,6 +4101,7 @@ procedure TPascalParserTool.ReadTypeReference; TButton controls.TButton TGenericClass + TGenericClass.TNestedClass } var SavePos: TAtomPosition; begin @@ -4122,6 +4123,11 @@ begin CurNode.LastChild := nil; ReadSpecialize(True); CurNode.EndPos := CurPos.EndPos; + while CurPos.Flag=cafPoint do begin + ReadNextAtom; + AtomIsIdentifierSaveE; + ReadNextAtom; + end; end; procedure TPascalParserTool.ReadClassInterfaceContent;