Browse Source

* test for set=nonset operation

git-svn-id: trunk@7011 -
peter 18 years ago
parent
commit
fdc692a5ca
2 changed files with 24 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 23 0
      tests/webtbf/tw8583.pp

+ 1 - 0
.gitattributes

@@ -7250,6 +7250,7 @@ tests/webtbf/tw8150g.pp svneol=native#text/plain
 tests/webtbf/tw8264a.pp svneol=native#text/plain
 tests/webtbf/tw8398.pp svneol=native#text/plain
 tests/webtbf/tw8528.pp svneol=native#text/plain
+tests/webtbf/tw8583.pp svneol=native#text/plain
 tests/webtbf/uw0744.pp svneol=native#text/plain
 tests/webtbf/uw0840a.pp svneol=native#text/plain
 tests/webtbf/uw0840b.pp svneol=native#text/plain

+ 23 - 0
tests/webtbf/tw8583.pp

@@ -0,0 +1,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.
+