summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/typecheck/fail/duplicate_binding.expect11
-rw-r--r--test/typecheck/fail/duplicate_binding.sail8
2 files changed, 19 insertions, 0 deletions
diff --git a/test/typecheck/fail/duplicate_binding.expect b/test/typecheck/fail/duplicate_binding.expect
new file mode 100644
index 00000000..cde78d77
--- /dev/null
+++ b/test/typecheck/fail/duplicate_binding.expect
@@ -0,0 +1,11 @@
+Type error:
+[duplicate_binding.sail]:6:10-11
+6 | let (x, x) = (true, false);
+  | ^
+  | Duplicate binding for x in pattern
+  | This error was caused by:
+  | [duplicate_binding.sail]:6:7-8
+  | 6 | let (x, x) = (true, false);
+  |  | ^
+  |  | Previous binding of x here
+  |
diff --git a/test/typecheck/fail/duplicate_binding.sail b/test/typecheck/fail/duplicate_binding.sail
new file mode 100644
index 00000000..e5c3d923
--- /dev/null
+++ b/test/typecheck/fail/duplicate_binding.sail
@@ -0,0 +1,8 @@
+default Order dec
+
+$include <prelude.sail>
+
+function main() : unit -> unit = {
+ let (x, x) = (true, false);
+ ()
+}