fpc/tests/test/tcustomattr9.pp
svenbarth e97a2cb03e * tests with Delphi showed that an attribute class must explicitely declare a parameterless constructor if it should be used, cause TCustomAttribute.Create is private
Note: this also means that TCustomAttribute itself can not be used as an attribute
* adjusted existing tests
+ added test

git-svn-id: trunk@42471 -
2019-07-20 20:03:38 +00:00

24 lines
267 B
ObjectPascal

{ %FAIL }
program tcustomattr9;
{$mode objfpc}{$H+}
{$modeswitch prefixedattributes}
uses
typinfo;
type
{ tmyt }
// TCustomAttribute's constructor is private!
tmyt = class(TCustomAttribute);
type
[Tmyt]
TMyObject = class(TObject)
end;
begin
end.