summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/for_shadow.expect4
-rw-r--r--test/c/for_shadow.sail9
-rw-r--r--test/ocaml/prelude.sail1
3 files changed, 14 insertions, 0 deletions
diff --git a/test/c/for_shadow.expect b/test/c/for_shadow.expect
new file mode 100644
index 00000000..5df31c96
--- /dev/null
+++ b/test/c/for_shadow.expect
@@ -0,0 +1,4 @@
+i = 0
+i = 1
+i = 2
+i = 3
diff --git a/test/c/for_shadow.sail b/test/c/for_shadow.sail
new file mode 100644
index 00000000..27095794
--- /dev/null
+++ b/test/c/for_shadow.sail
@@ -0,0 +1,9 @@
+
+val "print_int" : (string, int) -> unit
+
+function main(() : unit) -> unit = {
+ let i : int = undefined;
+ foreach (i from 0 to 3) {
+ print_int("i = ", i);
+ }
+} \ No newline at end of file
diff --git a/test/ocaml/prelude.sail b/test/ocaml/prelude.sail
index 6a8c703f..05c7bc9e 100644
--- a/test/ocaml/prelude.sail
+++ b/test/ocaml/prelude.sail
@@ -18,3 +18,4 @@ overload operator == = {eq_string, eq_real, eq_anything}
overload ~ = {not_bool, not_vec}
val print = "print_endline" : string -> unit
+