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

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.