fpc/tests/test/tcustomattr8.pp
2019-07-12 22:05:12 +00:00

38 lines
462 B
ObjectPascal

{ %fail }
program tcustomattr8;
{$mode objfpc}{$H+}
{$modeswitch prefixedattributes}
uses
typinfo;
type
{ tmyt }
TMyt = class(TCustomAttribute)
constructor create;
end;
type
{ TMyObject }
[TMyt]
TMyObject = class(TObject)
end;
// Attributes for integers are not allowed, so the following should fail, since
// there is nothing to bind the attribute to.
[TMyt]
int = integer;
constructor TMyt.create;
begin
end;
begin
end.