aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/assign_const_element.elna
blob: 721d337f06f10541860fc1683cc171a5270d027b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module

type
  CI = const Int

proc f()
var
  a: [3]CI := [1, 2, 3]
begin
  a[1] := 6 (* @Error Cannot assign to a value of type 'CI', because it is constant or contains constant members *)
return

end.