diff --git a/test/c/set_struct.expect b/test/c/set_struct.expect new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/test/c/set_struct.expect @@ -0,0 +1 @@ +ok diff --git a/test/c/set_struct.sail b/test/c/set_struct.sail new file mode 100644 index 000000000..17ba1c795 --- /dev/null +++ b/test/c/set_struct.sail @@ -0,0 +1,13 @@ +default Order dec + +$option -undefined_gen + +$include + +struct S = { + f1 : {0, 1} +} + +function main() -> unit = { + print_endline("ok"); +} diff --git a/test/c/set_struct2.expect b/test/c/set_struct2.expect new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/test/c/set_struct2.expect @@ -0,0 +1 @@ +ok diff --git a/test/c/set_struct2.sail b/test/c/set_struct2.sail new file mode 100644 index 000000000..0d9f57a29 --- /dev/null +++ b/test/c/set_struct2.sail @@ -0,0 +1,19 @@ +default Order dec + +$option -undefined_gen + +$include + +$[undefined_gen skip] +struct S = { + f1 : {0, 1} +} + +val undefined_S : unit -> S + +function undefined_S() = struct { f1 = 0 } + +function main() -> unit = { + let _ : S = undefined; + print_endline("ok"); +}