mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 06:39:31 +01: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;
 | 
			
		||||
    CurNode.Desc:=ctnIdentifier;
 | 
			
		||||
    CurNode.EndPos:=CurPos.EndPos;
 | 
			
		||||
    EndChildNode;
 | 
			
		||||
    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
 | 
			
		||||
      SaveRaiseCharExpectedButAtomFound(20170421195756,';');
 | 
			
		||||
  end else begin
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@ interface
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TClassOfMy = class of TMy{declaration:fdt_classof.TMy};
 | 
			
		||||
  TClass1OfMy = class of TMy{declaration:fdt_classof.TMy} deprecated 'abc' experimental;
 | 
			
		||||
 | 
			
		||||
  { TMy }
 | 
			
		||||
 | 
			
		||||
@ -14,6 +15,8 @@ type
 | 
			
		||||
    class procedure Run;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  TClass2OfMy = class of fdt_classof.TMy{declaration!:fdt_classof.TMy};
 | 
			
		||||
 | 
			
		||||
procedure DoIt;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user