aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/generic_constructor.elna
blob: d0a3f780cb3178d3935b5117cdd19c154ee75a42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
program()
type
  File = record
    fd: Int
  end

  Stack#[T] = record
    items: T;
    top: Word
  end

var
  s: Stack#[^File]
  f: File

begin
  s := Stack#[^File]{ top: 1u, items: @f };
  assert(s.top = 1u);
  assert(s.items = @f)
end.