Implementation is missing for overloaded function with type alias in declaration and original type in implementation

Issue #40 resolved
Sorien created an issue

i noticed at one of my class method that it plugin will mark is as "implementation is missing for create" but code is valid

  IFoo = interface(IUnknown)
  end;

  TFoo = class
  public
    constructor Create(const a: IFoo; const b: Boolean = False); overload;
    constructor Create(const abc: IUnknown); overload; //implementation is missing for create
  end;


implementation

constructor TFoo.Create(const a: IFoo; const b: Boolean = False);
begin
 ///
end;

constructor TFoo.Create(const abc: IInterface);
begin
 ///
end;

Comments (3)

  1. Christopher Wosinski repo owner
    • changed status to open

    The bug only appears in overloaded methods since the parameter lists of declaration and implementation need to match in that cases. (Methods without overloaded versions don't need to have matching parameter lists in their implementations).

    The comparison of parameter lists is currently broken due to performance reasons. OmniPascal compares type names where it should compare types. Since IUnknown and IInterface have different names the comparison fails even though IUnknown is an alias for IInterface. I need to fix that.

  2. Log in to comment