tw8583.pp 280 B

1234567891011121314151617181920212223
  1. { %fail }
  2. program testbug;
  3. {$mode objfpc}{$H+}
  4. type
  5. TState = (a, b, c, d);
  6. TStates = set of TState;
  7. var
  8. s : TStates;
  9. begin
  10. s := [a];
  11. if s = a then
  12. writeln('Should give a compile time error');
  13. if s = b then halt(1);
  14. if s = [a] then
  15. writeln('OK');
  16. end.