E2549 Cannot declare parameterized type derived from custom attribute class (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

This error occurs when using a parameterized type that inherits from TCustomAttribute.

program GenericAttributes;

{$APPTYPE CONSOLE}

type
  AttrAttribute<T> = class(TCustomAttribute)
  end;

  [Attr<Byte>]
  TNew = type Integer;

begin
end.

See Also