mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 08:19:27 +02:00
40 lines
432 B
ObjectPascal
40 lines
432 B
ObjectPascal
{ %fail }
|
|
program tcustomattr7;
|
|
|
|
{$mode objfpc}{$H+}
|
|
{$modeswitch prefixedattributes}
|
|
|
|
uses
|
|
typinfo;
|
|
|
|
type
|
|
|
|
{ tmyt }
|
|
|
|
TMyt = class(TCustomAttribute)
|
|
constructor create;
|
|
end;
|
|
|
|
type
|
|
|
|
{ TMyObject }
|
|
|
|
TMyObject = class(TObject)
|
|
private
|
|
FInt: integer;
|
|
published
|
|
// Should fail because there is nothing to bind the custom attribute to.
|
|
[TMyt]
|
|
end;
|
|
|
|
constructor TMyt.create;
|
|
begin
|
|
//
|
|
end;
|
|
|
|
|
|
begin
|
|
//
|
|
end.
|
|
|