aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/compare_unrelated_records.elna
blob: 4b04aa7ca362262adc81b1ffe016ba78dd0d5337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
type
  A = record
    x: Int
  end
  B = record
    y: Int;
    z: Int
  end

var
  a: A
  b: B
  ok: Bool

program()
begin
  ok := b = a (* @Error Invalid operands of type 'B' and 'A' for operator = *)
return 0u8

end.