aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/assign_member_of_const.elna
blob: 44fb5669aa3f9e362f2417a0729aee8f849f5684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module

type
  R = record
    x: Int
  end

proc f()
var
  r: const R := { R; x: 5 }
begin
  r.x := 6 (* @Error Cannot assign to a value of type 'const Int', because it is constant or contains constant members *)
return

end.