summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/typecheck/fail/default_order.sail6
-rw-r--r--test/typecheck/pass/default_order.sail1
2 files changed, 7 insertions, 0 deletions
diff --git a/test/typecheck/fail/default_order.sail b/test/typecheck/fail/default_order.sail
new file mode 100644
index 00000000..8de5cc46
--- /dev/null
+++ b/test/typecheck/fail/default_order.sail
@@ -0,0 +1,6 @@
+(* Could make an argument for why this should be ok, but allowing
+default order to change could have unintended consequences if we arn't
+careful, so it seems safer to just forbid it *)
+
+default Order dec
+default Order inc
diff --git a/test/typecheck/pass/default_order.sail b/test/typecheck/pass/default_order.sail
new file mode 100644
index 00000000..a283b221
--- /dev/null
+++ b/test/typecheck/pass/default_order.sail
@@ -0,0 +1 @@
+default Order dec