mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 05:39:29 +01:00 
			
		
		
		
	encountering a method with the correct name that does not have the
    "overload" directive (same logic as when looking for a call candidate,
    to avoid errors when using a Pascal-level wrapper to call interface
    methods, and Delphi-compatible since it always required "overload" for
    overloaded methods)
   o also catches calling convention mismatches like in webtbs/tw27349
git-svn-id: trunk@40683 -
		
	
			
		
			
				
	
	
		
			35 lines
		
	
	
		
			475 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			475 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
{ %fail }
 | 
						|
 | 
						|
{$mode objfpc}{$h+}
 | 
						|
{$interfaces corba}
 | 
						|
 | 
						|
type
 | 
						|
  tintf = interface
 | 
						|
    procedure test(l: longint);
 | 
						|
    procedure test(s: string);
 | 
						|
  end;
 | 
						|
 | 
						|
  tp = class
 | 
						|
    procedure test(l: longint); virtual;
 | 
						|
    procedure test(s: string); virtual;
 | 
						|
  end;
 | 
						|
 | 
						|
  tc = class(tp, tintf)
 | 
						|
    procedure test(l: longint); override;
 | 
						|
  end;
 | 
						|
 | 
						|
procedure tp.test(l: longint);
 | 
						|
  begin
 | 
						|
  end;
 | 
						|
 | 
						|
procedure tp.test(s: string);
 | 
						|
  begin
 | 
						|
  end;
 | 
						|
 | 
						|
procedure tc.test(l: longint);
 | 
						|
  begin
 | 
						|
  end;
 | 
						|
 | 
						|
begin
 | 
						|
end.
 |