summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/shadow_let.expect3
-rw-r--r--test/c/shadow_let.sail14
2 files changed, 17 insertions, 0 deletions
diff --git a/test/c/shadow_let.expect b/test/c/shadow_let.expect
new file mode 100644
index 00000000..133cecaa
--- /dev/null
+++ b/test/c/shadow_let.expect
@@ -0,0 +1,3 @@
+x = 3
+x = 5
+x = 7
diff --git a/test/c/shadow_let.sail b/test/c/shadow_let.sail
new file mode 100644
index 00000000..18410c74
--- /dev/null
+++ b/test/c/shadow_let.sail
@@ -0,0 +1,14 @@
+default Order dec
+
+$include <prelude.sail>
+
+val main : unit -> unit
+
+function main() = {
+ let x : int = 3;
+ print_int("x = ", x);
+ let x = x + 2;
+ print_int("x = ", x);
+ let x = x + 2;
+ print_int("x = ", x)
+} \ No newline at end of file