Class Completion (Ctrl-shift-C) fills in call to "Inherited" method of overridden methods of abstract methods
Original Reporter info from Mantis: lee_is_me
-
Reporter name: Lee Jenkins
Original Reporter info from Mantis: lee_is_me
- Reporter name: Lee Jenkins
Description:
Given:
TObjectWithAbstractMethods = class(TtiObjectStreamer)
public
function ObjectToStr(const AObject: TtiObject): string; vitual; abstract;
end;
TDescendentObject = class(TObjectWithAbstractMethods)
public
function ObjectToStr(const AObject: TtiObject): string; override;
end;
When pressing to CTRL-SHIFT-C in the declaration of the class above, the following method implementation is automatically created.
TDescendantObject.ObjectToStr(const AObject: TtiObject): string;
begin
inherited ObjectToStr(AObject);
end;
Since ObjecToStr() is declared abstract in the super class, the ide (rightfully so) emits a compile error indicating that you can call an inherited abstract method.
Mantis conversion info:
- Mantis ID: 17677
- Fixed in revision: r33955 (#ce5458ac)