summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/warl_undef.expect1
-rw-r--r--test/c/warl_undef.sail29
2 files changed, 30 insertions, 0 deletions
diff --git a/test/c/warl_undef.expect b/test/c/warl_undef.expect
new file mode 100644
index 00000000..9766475a
--- /dev/null
+++ b/test/c/warl_undef.expect
@@ -0,0 +1 @@
+ok
diff --git a/test/c/warl_undef.sail b/test/c/warl_undef.sail
new file mode 100644
index 00000000..4828afc8
--- /dev/null
+++ b/test/c/warl_undef.sail
@@ -0,0 +1,29 @@
+default Order dec
+
+$option -undefined_gen
+
+$include <prelude.sail>
+
+val "eq_anything" : forall ('a: Type). ('a, 'a) -> bool
+
+overload operator == = {eq_anything}
+
+function neq_anything forall ('a: Type). (x: 'a, y: 'a) -> bool =
+ not_bool(x == y)
+
+overload operator != = {neq_anything}
+
+val "print_endline" : string -> unit
+
+struct WARL_range = {
+ rangelist : list(int),
+}
+
+let x : WARL_range = struct {
+ rangelist = [|0, 1|]
+}
+
+function main () : unit -> unit = {
+ let z: WARL_range = undefined;
+ print_endline("ok")
+}