summaryrefslogtreecommitdiff
path: root/classattributes/tests/test/tclassattribute5.pp
blob: ea731218712d5427c81be7edee6ed50ecde194cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ %fail }
program tclassattribute5;

{$mode objfpc}{$H+}
{$modeswitch prefixedattributes}

uses
  typinfo;

type

  { tmyt }

  tmyt = class(TCustomAttribute)
  private
    FID: integer;
  public
    constructor create(Id: integer);
  end;

type
  // Delphi XE does compile attributes with invalid parameters.
  // That's clearly a Delphi-bug, so fpc should fail on the following:
  [Tmyt(924,32)]
  TMyObject = class(TObject)
  end;

begin
end.