diff options
Diffstat (limited to 'testsuite/fail_compilation')
| -rw-r--r-- | testsuite/fail_compilation/constant_enum_to_int.elna | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/constant_enum_to_int.elna b/testsuite/fail_compilation/constant_enum_to_int.elna new file mode 100644 index 0000000..f97bd3f --- /dev/null +++ b/testsuite/fail_compilation/constant_enum_to_int.elna @@ -0,0 +1,10 @@ +type + Enumeration = (one, two, three) + +var + x: [3]Int := [3]Int{ 1, 2, 3 } + y: []Int + +begin + y := x[Enumeration.one to Enumeration.two] (* @Error Array index must be an integral type, but got 'Enumeration' *) +end. |
