summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw12788.pp
blob: 260e3c49112c2718c092660ece6914a00d278e8f (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
31
32
33
{$packset 1}
program t;
{$mode objfpc}{$h+}

uses typinfo;

type
  tsmall = 0..11;
  tsmallset = set of tsmall;

  tbig = 25..200;
  tbigset_ = set of tbig;

var
  ti: PTypeInfo;
  tdata: PTypeData;
begin
  ti := typeinfo(tsmallset);
  tdata := GetTypeData(ti);
  writeln(ord(tdata^.OrdType));
  if tdata^.CompType = typeinfo(tsmall) then
    writeln('small ok')
  else
    halt(1);

  ti := typeinfo(tbigset_);
  tdata := GetTypeData(ti);
  writeln(ord(tdata^.OrdType));
  if tdata^.CompType = typeinfo(tbig) then
    writeln('big ok')
  else
    halt(2);
end.