aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/constant_enum_to_int.elna
blob: 60bfeae93905dd7fd76f88e3be92fba24c7bcfb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
program()
type
  Enumeration = (one, two, three)

var
  x: [3]Int := [1, 2, 3]
  y: []Int

begin
  y := x[Enumeration.one to Enumeration.two] (* @Error Array index must be of type 'Word' or 'Int', but got 'Enumeration' *)
end.