summaryrefslogtreecommitdiff
path: root/test/c/poly_record.sail
blob: afe1f144af95c4e8d4635fa5ed8b610398218761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
default Order dec

val "print_endline" : string -> unit

struct S('a: Type) = {
  field1 : 'a,
  field2 : unit
}

function f forall ('a :Type). (s: S('a)) -> unit = {
  s.field2
}

function main((): unit) -> unit = {
  let s : S(unit) = struct { field1 = (), field2 = () };
  f(s);
  print_endline("ok");
}