summaryrefslogtreecommitdiff
path: root/test/typecheck
diff options
context:
space:
mode:
Diffstat (limited to 'test/typecheck')
-rw-r--r--test/typecheck/pass/ex_cast.sail12
-rw-r--r--test/typecheck/pass/nzcv.sail4
2 files changed, 16 insertions, 0 deletions
diff --git a/test/typecheck/pass/ex_cast.sail b/test/typecheck/pass/ex_cast.sail
new file mode 100644
index 00000000..5ea22d14
--- /dev/null
+++ b/test/typecheck/pass/ex_cast.sail
@@ -0,0 +1,12 @@
+
+default Order dec
+
+val cast int -> exist 'n. [:'n:] effect pure ex_int
+
+val [:'n:] -> bit['n] effect pure zeros
+
+val int -> unit effect pure test
+
+function test n = {
+ x := zeros(n)
+}
diff --git a/test/typecheck/pass/nzcv.sail b/test/typecheck/pass/nzcv.sail
index a477cd97..3e23e529 100644
--- a/test/typecheck/pass/nzcv.sail
+++ b/test/typecheck/pass/nzcv.sail
@@ -4,6 +4,10 @@ val bit[4] -> unit effect pure test
function test nzcv =
{
+ N := 0b0;
+ Z := 0b0;
+ C := 0b0;
+ V := 0b0;
(N,Z,C,V) := nzcv;
()
}