mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:19:28 +02:00
merge r51138 #d8163c8187,r51139,r51140 codetools:
* prevent AV for incomplete generic types * fix TDirectiveSequenceItem.FindValue * pascalreadertool: support TGenericClass<TypeReference,TypeReference>.TNestedClass (delphi mode) git-svn-id: branches/fixes_1_6@51226 -
This commit is contained in:
parent
e0a4752636
commit
faea94b4b2
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -4101,6 +4101,7 @@ procedure TPascalParserTool.ReadTypeReference;
|
||||
TButton
|
||||
controls.TButton
|
||||
TGenericClass<TypeReference,TypeReference>
|
||||
TGenericClass<TypeReference,TypeReference>.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;
|
||||
|
Loading…
Reference in New Issue
Block a user