summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/tuple_conversion.expect2
-rw-r--r--test/c/tuple_conversion.sail14
2 files changed, 16 insertions, 0 deletions
diff --git a/test/c/tuple_conversion.expect b/test/c/tuple_conversion.expect
new file mode 100644
index 00000000..0f224189
--- /dev/null
+++ b/test/c/tuple_conversion.expect
@@ -0,0 +1,2 @@
+test3
+test3
diff --git a/test/c/tuple_conversion.sail b/test/c/tuple_conversion.sail
new file mode 100644
index 00000000..d2fd13c6
--- /dev/null
+++ b/test/c/tuple_conversion.sail
@@ -0,0 +1,14 @@
+default Order dec
+
+$include <flow.sail>
+
+val "print_int" : (string, int) -> unit
+
+function main() : unit -> unit = {
+ let x : (string, int(3)) = ("test", 3);
+ let (str, n) = x;
+ print_int(str, n);
+ let y : (string, int) = x;
+ let (str, n) = y;
+ print_int(str, n);
+}