mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 07:43:04 +01:00 
			
		
		
		
	* fix invalid typecast
git-svn-id: trunk@8432 -
This commit is contained in:
		
							parent
							
								
									f88c5e1324
								
							
						
					
					
						commit
						68245771cc
					
				@ -730,22 +730,22 @@ implementation
 | 
			
		||||
              (ttypesym(srsym).typedef.typ=objectdef) then
 | 
			
		||||
            begin
 | 
			
		||||
              aclass:=tobjectdef(ttypesym(srsym).typedef);
 | 
			
		||||
              aprocsym:=tprocsym(aclass.symtable.Find(sp));
 | 
			
		||||
              { we solve this below }
 | 
			
		||||
              if assigned(aprocsym) then
 | 
			
		||||
              srsym:=tsym(aclass.symtable.Find(sp));
 | 
			
		||||
              if assigned(srsym) then
 | 
			
		||||
               begin
 | 
			
		||||
                 if aprocsym.typ<>procsym then
 | 
			
		||||
                  begin
 | 
			
		||||
                    {  we use a different error message for tp7 so it looks more compatible }
 | 
			
		||||
                    if (m_fpc in current_settings.modeswitches) then
 | 
			
		||||
                      Message1(parser_e_overloaded_no_procedure,aprocsym.realname)
 | 
			
		||||
                    else
 | 
			
		||||
                      Message(parser_e_methode_id_expected);
 | 
			
		||||
                    { rename the name to an unique name to avoid an
 | 
			
		||||
                      error when inserting the symbol in the symtable }
 | 
			
		||||
                    orgsp:=orgsp+'$'+tostr(current_filepos.line);
 | 
			
		||||
                    aprocsym:=nil;
 | 
			
		||||
                  end;
 | 
			
		||||
                 if srsym.typ=procsym then
 | 
			
		||||
                   aprocsym:=tprocsym(srsym)
 | 
			
		||||
                 else
 | 
			
		||||
                   begin
 | 
			
		||||
                     {  we use a different error message for tp7 so it looks more compatible }
 | 
			
		||||
                     if (m_fpc in current_settings.modeswitches) then
 | 
			
		||||
                       Message1(parser_e_overloaded_no_procedure,srsym.realname)
 | 
			
		||||
                     else
 | 
			
		||||
                       Message(parser_e_methode_id_expected);
 | 
			
		||||
                     { rename the name to an unique name to avoid an
 | 
			
		||||
                       error when inserting the symbol in the symtable }
 | 
			
		||||
                     orgsp:=orgsp+'$'+tostr(current_filepos.line);
 | 
			
		||||
                   end;
 | 
			
		||||
               end
 | 
			
		||||
              else
 | 
			
		||||
               begin
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user