- changed status to open
Implementation is missing for overloaded function with type alias in declaration and original type in implementation
Issue #40
resolved
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)
-
repo owner -
repo owner - changed title to Implementation is missing for overloaded function with type alias in declaration and original type in implementation
-
repo owner - changed status to resolved
Fixed in the upcoming version.
- Log in to comment
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
andIInterface
have different names the comparison fails even thoughIUnknown
is an alias forIInterface
. I need to fix that.