aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/assign_const_member.elna
blob: 8aecb017c0f3731ffd32e4d210a26c8866b3625a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
type
  R = record
    x: const Int
  end

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

end.