Extension class compiles as long as there is no metaclass defined on TFoo.
If there is a metaclass TFooClass defined, E44 appears in extension class.
type
TFooClass = class of TFoo;
TFoo = public class(object)
public
function Bar: String; begin result := ‘Bar’; end;
end;
TFooHelper = public extension class(TFoo)
function TwoBars: String;
begin
result := self.Bar + self.Bar; // -> (E44) No member “Bar” on type “class of TFooHelper”
end;
end;
All I can Gell you it works in the current version; it’s hard to say when exactly it got fixed, since there was no open issue to track this, so int probably got addressed as part of some other change over the past three years,…