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.