summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/match_bind.expect1
-rw-r--r--test/c/match_bind.sail11
2 files changed, 12 insertions, 0 deletions
diff --git a/test/c/match_bind.expect b/test/c/match_bind.expect
new file mode 100644
index 00000000..1754ece3
--- /dev/null
+++ b/test/c/match_bind.expect
@@ -0,0 +1 @@
+1. y = 3
diff --git a/test/c/match_bind.sail b/test/c/match_bind.sail
new file mode 100644
index 00000000..39738ac3
--- /dev/null
+++ b/test/c/match_bind.sail
@@ -0,0 +1,11 @@
+default Order dec
+
+$include <prelude.sail>
+
+function main() -> unit = {
+ let x: int = 3;
+ match x {
+ _ if let y = x in y == 3 => let y = x in print_int("1. y = ", y),
+ _ if let y = x in true => let y = x in print_int("2. y = ", y)
+ }
+} \ No newline at end of file