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

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

program()
begin
  y := x[Enumeration.one to Enumeration.two] (* @Error Array index must be an integral type, but got 'Enumeration' *)
return 0u8

end.