From 0ca56ed853c3d9bc8c26d1b014d8b665363fc2d0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 15 Sep 2016 01:01:58 -0700 Subject: 3355 --- html/immutable_error.mu.html | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 html/immutable_error.mu.html (limited to 'html/immutable_error.mu.html') diff --git a/html/immutable_error.mu.html b/html/immutable_error.mu.html new file mode 100644 index 00000000..2d1fcae6 --- /dev/null +++ b/html/immutable_error.mu.html @@ -0,0 +1,47 @@ + + + + +Mu - immutable_error.mu + + + + + + + + + + +
+# compare mutable.mu
+
+def main [
+  local-scope
+  x:address:number <- new number:type
+  foo x
+]
+
+def foo x:address:number [
+  local-scope
+  load-ingredients
+  *x <- copy 34  # will cause an error because x is immutable in this function
+]
+
+ + + -- cgit 1.4.1-2-gfad0