summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbf/tw8583.pp
blob: 4defe0bed7bcd2194f3d7756786525e1ba94ae1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ %fail }

program testbug;

{$mode objfpc}{$H+}

type
  TState = (a, b, c, d);
  TStates = set of TState;

var
  s : TStates;
begin
  s := [a];
  if s = a then
    writeln('Should give a compile time error');

  if s = b then halt(1);

  if s = [a] then
    writeln('OK');
end.