mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 11:53:42 +01:00 
			
		
		
		
	* problem with virtual methods and interfaces fixed, fixes #8158
git-svn-id: trunk@6099 -
This commit is contained in:
		
							parent
							
								
									8c48cb108a
								
							
						
					
					
						commit
						eda8184e21
					
				| @ -123,6 +123,8 @@ implementation | ||||
|           begin | ||||
|             pd:=tprocdef(tprocsym(p).ProcdefList[i]); | ||||
|             insertdef(TAsmList(arg),pd.returndef); | ||||
|             if (po_virtualmethod in pd.procoptions) then | ||||
|               insertdef(TAsmList(arg),pd._class); | ||||
|           end; | ||||
|       end; | ||||
| 
 | ||||
|  | ||||
| @ -249,10 +249,12 @@ implementation | ||||
|           so they won't be written implicitly } | ||||
|         if (def.typ=procdef) then | ||||
|           def.dbg_state:=dbg_state_written; | ||||
| 
 | ||||
|         { Stab must already be written, or we must be busy writing it } | ||||
|         if writing_def_stabs and | ||||
|            not(def.dbg_state in [dbg_state_writing,dbg_state_written]) then | ||||
|           internalerror(200403091); | ||||
| 
 | ||||
|         { Keep track of used stabs, this info is only usefull for stabs | ||||
|           referenced by the symbols. Definitions will always include all | ||||
|           required stabs } | ||||
| @ -798,6 +800,7 @@ implementation | ||||
|       var | ||||
|         anc : tobjectdef; | ||||
|         oldtypesym : tsym; | ||||
|         i : longint; | ||||
|       begin | ||||
|         if (def.dbg_state in [dbg_state_writing,dbg_state_written]) then | ||||
|           exit; | ||||
| @ -854,12 +857,18 @@ implementation | ||||
|           objectdef : | ||||
|             begin | ||||
|               insertdef(list,vmtarraytype); | ||||
|               if assigned(tobjectdef(def).ImplementedInterfaces) then | ||||
|                 for i:=0 to tobjectdef(def).ImplementedInterfaces.Count-1 do | ||||
|                   insertdef(list,TImplementedInterface(tobjectdef(def).ImplementedInterfaces[i]).IntfDef); | ||||
|               { first the parents } | ||||
|               anc:=tobjectdef(def); | ||||
|               while assigned(anc.childof) do | ||||
|                 begin | ||||
|                   anc:=anc.childof; | ||||
|                   insertdef(list,anc); | ||||
|                   if assigned(anc.ImplementedInterfaces) then | ||||
|                     for i:=0 to anc.ImplementedInterfaces.Count-1 do | ||||
|                       insertdef(list,TImplementedInterface(anc.ImplementedInterfaces[i]).IntfDef); | ||||
|                 end; | ||||
|               tobjectdef(def).symtable.symList.ForEachCall(@field_write_defs,list); | ||||
|               tobjectdef(def).symtable.symList.ForEachCall(@method_write_defs,list); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 florian
						florian