mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 11:24:16 +01:00 
			
		
		
		
	* when compiling <interface> as <interface> we can't assume
anything about relation
This commit is contained in:
		
							parent
							
								
									b4ec92dad3
								
							
						
					
					
						commit
						6d1506a7c6
					
				@ -1999,10 +1999,12 @@ implementation
 | 
				
			|||||||
            { left is an interface }
 | 
					            { left is an interface }
 | 
				
			||||||
            else if is_interface(left.resulttype.def) then
 | 
					            else if is_interface(left.resulttype.def) then
 | 
				
			||||||
             begin
 | 
					             begin
 | 
				
			||||||
               { the operands must be related }
 | 
					               { the operands must be related
 | 
				
			||||||
 | 
					                 we don't necessarily know how the both interfaces are implemented, so we can't do this check (FK)
 | 
				
			||||||
               if (not(tobjectdef(left.resulttype.def).is_related(tobjectdef(right.resulttype.def)))) and
 | 
					               if (not(tobjectdef(left.resulttype.def).is_related(tobjectdef(right.resulttype.def)))) and
 | 
				
			||||||
                  (not(tobjectdef(right.resulttype.def).is_related(tobjectdef(left.resulttype.def)))) then
 | 
					                  (not(tobjectdef(right.resulttype.def).is_related(tobjectdef(left.resulttype.def)))) then
 | 
				
			||||||
                 CGMessage2(type_e_classes_not_related,left.resulttype.def.typename,right.resulttype.def.typename);
 | 
					                 CGMessage2(type_e_classes_not_related,left.resulttype.def.typename,right.resulttype.def.typename);
 | 
				
			||||||
 | 
					               }
 | 
				
			||||||
             end
 | 
					             end
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
             CGMessage1(type_e_class_type_expected,left.resulttype.def.typename);
 | 
					             CGMessage1(type_e_class_type_expected,left.resulttype.def.typename);
 | 
				
			||||||
@ -2084,7 +2086,11 @@ begin
 | 
				
			|||||||
end.
 | 
					end.
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  $Log$
 | 
					  $Log$
 | 
				
			||||||
  Revision 1.85  2002-10-05 12:43:25  carl
 | 
					  Revision 1.86  2002-10-06 16:10:23  florian
 | 
				
			||||||
 | 
					    * when compiling <interface> as <interface> we can't assume
 | 
				
			||||||
 | 
					      anything about relation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Revision 1.85  2002/10/05 12:43:25  carl
 | 
				
			||||||
    * fixes for Delphi 6 compilation
 | 
					    * fixes for Delphi 6 compilation
 | 
				
			||||||
     (warning : Some features do not work under Delphi)
 | 
					     (warning : Some features do not work under Delphi)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -2189,4 +2195,4 @@ end.
 | 
				
			|||||||
  Revision 1.58  2002/05/18 13:34:09  peter
 | 
					  Revision 1.58  2002/05/18 13:34:09  peter
 | 
				
			||||||
    * readded missing revisions
 | 
					    * readded missing revisions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user