aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/generic_base_mismatch.elna
blob: dd3bec73b645ff53464d8d0d0cf03fdd8664e778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
program()
type
  File = record
    fd: Int
  end
  Socket = record
    handle: Int
  end

  List#[T] = record
    head: ^T
  end

  Queue#[T] = record(List#[T])
    tail: ^T
  end

var
  jobs: Queue#[File]
  wrong: ^List#[Socket]

begin
  wrong := @jobs (* @Error Expected type '\^List#\[Socket\]', but got '\^Queue#\[File\]' *)
end.