diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2009-09-03 20:21:30 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2009-09-03 20:21:30 +0000 |
commit | 3b846d02e5755e1803ef97406c88ae06f7dc833d (patch) | |
tree | c8d1aaaae05d023f6f4bed6c15a3ee427b5ebfbd /tests/test/tcase11.pp | |
parent | 0dce2b3a7f42f397d88c6c94bca19f378a177009 (diff) | |
download | fpc-3b846d02e5755e1803ef97406c88ae06f7dc833d.tar.gz |
o patch by Michael V. Denisenko to handle case <string> of (see also #13700)
+ compiler implementation
+ tests
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@13642 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/test/tcase11.pp')
-rw-r--r-- | tests/test/tcase11.pp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test/tcase11.pp b/tests/test/tcase11.pp new file mode 100644 index 0000000000..088a77e4af --- /dev/null +++ b/tests/test/tcase11.pp @@ -0,0 +1,25 @@ +{%FAIL} + +{ duplicate labels in different cases, one of them is range } + +{$H+} +var + my_str: string; + i: integer; + +begin + my_str := 'cab'; + i := -1; + + case my_str of + 'a'..'b': i := 1; + 'c': i := 2; + 'c'..'d': i := 3; + else i := 0; + end; + + if (i <> 3) then begin + writeln('Error'); + Halt(1); + end; +end. |