mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 13:18:08 +02:00
Codetools: fix parsing of "class of" with deprecated or unit-name prefix.
This commit is contained in:
parent
4027fdb098
commit
439afd6033
@ -4708,8 +4708,16 @@ begin
|
|||||||
CreateChildNode;
|
CreateChildNode;
|
||||||
CurNode.Desc:=ctnIdentifier;
|
CurNode.Desc:=ctnIdentifier;
|
||||||
CurNode.EndPos:=CurPos.EndPos;
|
CurNode.EndPos:=CurPos.EndPos;
|
||||||
EndChildNode;
|
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
|
while CurPos.Flag = cafPoint do begin
|
||||||
|
// TMyClassClass = class of unit1.TMyClass
|
||||||
|
ReadNextAtom;
|
||||||
|
AtomIsIdentifierSaveE(20250403202500);
|
||||||
|
CurNode.EndPos:=CurPos.EndPos;
|
||||||
|
ReadNextAtom;
|
||||||
|
end;
|
||||||
|
EndChildNode;
|
||||||
|
ReadHintModifiers(False);
|
||||||
if CurPos.Flag<>cafSemicolon then
|
if CurPos.Flag<>cafSemicolon then
|
||||||
SaveRaiseCharExpectedButAtomFound(20170421195756,';');
|
SaveRaiseCharExpectedButAtomFound(20170421195756,';');
|
||||||
end else begin
|
end else begin
|
||||||
|
@ -6,6 +6,7 @@ interface
|
|||||||
|
|
||||||
type
|
type
|
||||||
TClassOfMy = class of TMy{declaration:fdt_classof.TMy};
|
TClassOfMy = class of TMy{declaration:fdt_classof.TMy};
|
||||||
|
TClass1OfMy = class of TMy{declaration:fdt_classof.TMy} deprecated 'abc' experimental;
|
||||||
|
|
||||||
{ TMy }
|
{ TMy }
|
||||||
|
|
||||||
@ -14,6 +15,8 @@ type
|
|||||||
class procedure Run;
|
class procedure Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TClass2OfMy = class of fdt_classof.TMy{declaration!:fdt_classof.TMy};
|
||||||
|
|
||||||
procedure DoIt;
|
procedure DoIt;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
Loading…
Reference in New Issue
Block a user