diff options
Diffstat (limited to 'test/c/poly_record.sail')
| -rw-r--r-- | test/c/poly_record.sail | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/c/poly_record.sail b/test/c/poly_record.sail new file mode 100644 index 00000000..afe1f144 --- /dev/null +++ b/test/c/poly_record.sail @@ -0,0 +1,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"); +} |
