E2528 Type parameters not allowed on this method (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

This error message occurs when you are trying to build a class by using collection style parameter. Constructors and destructors do not support parameterized methods.


{$APPTYPE CONSOLE}
type
  TFoo<T: class> = class(TObject)
    constructor CreateEx<T>; // E2528
  end;

See Also